--- ghostscript-9.18/configure.ac.orig 2016-01-06 21:16:43.016302214 +0100 +++ ghostscript-9.18/configure.ac 2016-01-06 21:35:06.882922225 +0100 @@ -1811,6 +1811,7 @@ PS_DEVS='psdf psdcmyk psdrgb pdfwrite ps2write eps2write bbox txtwrite inkcov ink_cov psdcmykog fpng' MISC_FDEVS='ccr cif inferno mag16 mag256 mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8 mgrmono miff24 plan9bm sgirgb sunhmono bit bitrgb bitrgbtags bitcmyk devicen spotcmyk xcf plib plibg plibm plibc plibk gprf' XPSDEV=$XPSWRITEDEVICE +SVGA_DEVS= while test -n "$drivers"; do if echo $drivers |grep "," >/dev/null; then @@ -1950,6 +1951,9 @@ AC_MSG_WARN(Unable to include opvp/oprp driver due to missing or disabled prerequisites...) fi ;; + svga) + SVGA_DEVS="vgalib.dev lvga256.dev" + ;; *) # It's a driver name (or a user messup) P_DEVS0="$P_DEVS0 `echo $THIS |sed -e 's,\.dev$,,'`" @@ -2047,6 +2051,7 @@ AC_SUBST(JBIG2_DEVS) AC_SUBST(IJS_DEVS) AC_SUBST(PNG_DEVS) +AC_SUBST(SVGA_DEVS) # This now gets done after handling --enable-dynamic # AC_SUBST(X11_DEVS) @@ -2129,6 +2134,10 @@ else DYNAMIC_DEVS="" fi + if test "x$SVGA_DEVS" != x; then + DYNAMIC_DEVS="$DYNAMIC_DEVS \$(GLOBJDIR)/lvga256.so \$(GLOBJDIR)/vgalib.so" + SVGA_DEVS= + fi DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\"" X11_DEVS="" OPT_CFLAGS="$DYNAMIC_CFLAGS $OPT_CFLAGS" --- ghostscript-9.18/Makefile.in.orig 2016-01-06 21:16:43.029635544 +0100 +++ ghostscript-9.18/Makefile.in 2016-01-06 21:36:00.216253925 +0100 @@ -594,7 +594,7 @@ DEVICE_DEVS7=@JBIG2_DEVS@ DEVICE_DEVS8= DEVICE_DEVS9=@XPS_DEVS@ -DEVICE_DEVS10= +DEVICE_DEVS10=@SVGA_DEVS@ DEVICE_DEVS11= DEVICE_DEVS12= DEVICE_DEVS13= --- ghostscript-9.18/devices/gdevl256.c.orig 2016-01-06 21:36:44.772918446 +0100 +++ ghostscript-9.18/devices/gdevl256.c 2016-01-07 16:17:39.900096231 +0100 @@ -169,8 +169,7 @@ gx_color_index lvga256_map_rgb_color(gx_device * dev, const gx_color_value cv[]) { - gx_color_value r, g, b; - r = cv[0]; g = cv[1]; b = cv[2]; + gx_color_value r = cv[0], g = cv[1], b = cv[2]; #define cv_bits(v,n) (v >> (gx_color_value_bits - n)) ushort r5 = cv_bits(r, 5), g5 = cv_bits(g, 5), b5 = cv_bits(b, 5); static const byte cube_bits[32] =