diff options
author | hrs <hrs@FreeBSD.org> | 2015-08-23 01:48:35 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2015-08-23 01:48:35 +0800 |
commit | 52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2 (patch) | |
tree | 445c3e315f03aa972de87391f921c655e4634f60 /print/ghostscript7-base/files/patch-src-configure.ac | |
parent | 069a5644197c0b8b71f45d29221cd5192af4c720 (diff) | |
download | freebsd-ports-gnome-52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2.tar.gz freebsd-ports-gnome-52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2.tar.zst freebsd-ports-gnome-52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2.zip |
- Split ghostscript into X11-independent and -dependent parts:
* print/ghostscript{7,8,9,9-agpl}-base
Installs Ghostscript binary, libgs, and related files.
These ports do not depend on X11 libraries (i.e. x11* devices
are not available). USES=ghostscript will set dependency on
one of them depending on GHOSTSCRIPT_DEFAULT.
The default device is set to "display" or "bbox".
* print/ghostscript{7,8,9,9-agpl}-x11
Installs a shared library which provides X11 support to
the installed Ghostscript binaries. x11* devices will be
enabled when the library is available.
This depends on *-base (RUN_DEPENDS). USES=ghostscript:x11
will set dependency on one of them.
- Fix integer overflow reported as CVE-2015-3228.
- Update Uses/ghostscript.mk:
* Add x11 keyword. nox11 keyword is now obsolete.
* Use packagename in *_DEPENDS line to prevent relationship between
-base and -x11 packages from being broken.
- Fix x11/nox11 keyword and bump PORTREVISION in ports using
USES=ghostscript to update dependency of pre-compiled packages.
Diffstat (limited to 'print/ghostscript7-base/files/patch-src-configure.ac')
-rw-r--r-- | print/ghostscript7-base/files/patch-src-configure.ac | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/print/ghostscript7-base/files/patch-src-configure.ac b/print/ghostscript7-base/files/patch-src-configure.ac new file mode 100644 index 000000000000..7cccac9b9483 --- /dev/null +++ b/print/ghostscript7-base/files/patch-src-configure.ac @@ -0,0 +1,172 @@ +--- src/configure.ac.orig 2003-04-16 22:59:56.000000000 +0900 ++++ src/configure.ac 2015-08-22 02:03:41.246954000 +0900 +@@ -8,6 +8,46 @@ + AC_PREREQ(2.52) + AC_CONFIG_SRCDIR(src/gs.c) + ++CFLAGS="${CFLAGS:=}" ++CPPFLAGS="${CPPFLAGS:=}" ++CXXFLAGS="${CXXFLAGS:=}" ++LDFLAGS="${LDFLAGS:=}" ++ ++dnl -------------------------------------------------- ++dnl Local utilities ++dnl -------------------------------------------------- ++ ++dnl GS_SPLIT_LIBS( LIBS, LINKLINE ) ++dnl Split a unix-style link line into a list of ++dnl bare library names. For example, the line ++dnl '-L/usr/X11R6/lib -lX11 -lXt' splits into ++dnl LIB='X11 Xt' ++dnl ++AC_DEFUN([GS_SPLIT_LIBS], [ ++# the makefile wants a list of just the library names ++for gs_item in $2; do ++ gs_stripped_item=`echo "$gs_item" | sed -e 's/^-l//'` ++ if test "x$gs_stripped_item" != "x$gs_item"; then ++ $1="$[$1] $gs_stripped_item" ++ fi ++done ++]) ++ ++dnl GS_SPLIT_LIBPATHS( LIBPATHS, LINKLINE ) ++dnl Split a unix-style link line into a list of ++dnl bare search path entries. For example, ++dnl '-L/usr/X11R6/lib -lX11 -L/opt/lib -lXt' ++dnl splits to LIBPATHS='/usr/X11R6/lib /opt/lib' ++dnl ++AC_DEFUN([GS_SPLIT_LIBPATHS], [ ++for gs_item in $2; do ++ gs_stripped_item=`echo "$gs_item" | sed -e 's/-L//'` ++ if test "x$gs_stripped_item" != "x$gs_item"; then ++ $1="$[$1] $gs_stripped_item" ++ fi ++done ++]) ++ + dnl -------------------------------------------------- + dnl Check for programs + dnl -------------------------------------------------- +@@ -94,7 +134,14 @@ + dnl -------------------------------------------------- + + AC_CHECK_LIB(m, cos) +-dnl AC_CHECK_LIB(pthread, pthread_create) ++SYNC="nosync" ++PTHREAD_LIBS="" ++AC_CHECK_LIB(pthread, pthread_create, [ ++ SYNC=posync; ++ PTHREAD_LIBS="-lpthread" ++]) ++AC_SUBST(SYNC) ++AC_SUBST(PTHREAD_LIBS) + + AC_MSG_CHECKING([for local jpeg library source]) + dnl At present, we give the local source priority over the shared +@@ -211,15 +258,68 @@ + AC_SUBST(STPLIB) + AC_SUBST(STPDEVS) + ++SOC_CFLAGS="" ++SOC_LIBS="" ++SOC_LOADER="dxmainc.c" ++ ++AC_SUBST(SOC_CFLAGS) ++AC_SUBST(SOC_LIBS) ++AC_SUBST(SOC_LOADER) ++ + dnl optional X11 for display devices + AC_PATH_XTRA +-if test x"$no_x" = x"yes"; then +- AC_MSG_NOTICE([disabling X11 output devices]) +- X11DEVS='' +-else +- X11DEVS='$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev' ++ ++X_LDFLAGS="" ++X_CFLAGS="" ++X_DEVS="" ++X_LIBS="" ++ ++if test x$with_x != xno; then ++ if test "$x_libraries" = "/usr/lib"; then ++ echo "Ignoring X library directory \"$x_libraries\" requested by configure." ++ x_libraries="NONE" ++ fi ++ if test ! "$x_libraries" = "NONE" -a ! "$x_libraries" = ""; then ++ X_LDFLAGS="-L$x_libraries" ++ if test "$uname" = "SunOS"; then ++ X_LDFLAGS="$X_LDFLAGS -R$x_libraries" ++ fi ++ fi ++ ++ if test "$x_includes" = "/usr/include"; then ++ echo "Ignoring X include directory \"$x_includes\" requested by configure." ++ x_includes="NONE" ++ fi ++ if test ! "$x_includes" = "NONE" -a ! "$x_includes" = ""; then ++ X_CFLAGS="-I$x_includes" ++ fi ++ ++ SAVELIBS="$LIBS" ++ SAVELDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS $X_LDFLAGS" ++ ++ AC_CHECK_LIB(X11,XOpenDisplay) ++ AC_CHECK_LIB(Xext,XdbeQueryExtension) ++ AC_CHECK_LIB(Xt,XtAppCreateShell) ++ ++ LDFLAGS="$SAVELDFLAGS" ++ LIBS="$SAVELIBS" ++ ++ if test "$ac_cv_lib_Xt_XtAppCreateShell" = yes; then ++ X11DEVS="\$(DD)x11.dev \$(DD)x11alpha.dev \$(DD)x11cmyk.dev \$(DD)x11mono.dev \$(DD)x11_.dev \$(DD)x11alt_.dev \$(DD)x11cmyk2.dev \$(DD)x11cmyk4.dev \$(DD)x11cmyk8.dev \$(DD)x11rg16x.dev \$(DD)x11rg32x.dev \$(DD)x11gray2.dev \$(DD)x11gray4.dev" ++ X_DEVS=$X11DEVS ++ # the makefile wants a list of just the library names in X_LIBS ++ GS_SPLIT_LIBS([X_LIBS], ++ [-lXt $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS]) ++ fi + fi ++ ++AC_SUBST(X_LDFLAGS) ++AC_SUBST(X_CFLAGS) ++AC_SUBST(X_LIBS) ++AC_SUBST(X_DEVS) + AC_SUBST(X11DEVS) ++AC_SUBST(XLIBS) + + dnl executible name + AC_ARG_WITH(gs, AC_HELP_STRING([--with-gs=NAME], +@@ -236,6 +336,32 @@ + fi]) + AC_SUBST(COMPILE_INITS) + ++dnl Dynamic device support. ++DYNAMIC_CFLAGS="" ++DYNAMIC_DEVS="" ++DYNAMIC_FLAGS="" ++DYNAMIC_LDFLAGS="" ++DYNAMIC_LIBS="" ++INSTALL_SHARED="" ++ ++AC_ARG_ENABLE([dynamic], AC_HELP_STRING([--enable-dynamic], ++ [Enable dynamically loaded drivers]), ++[ ++ DYNAMIC_CFLAGS="-fPIC" ++ DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so" ++ DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\"" ++ DYNAMIC_LDFLAGS="-fPIC -shared" ++ DYNAMIC_LIBS="" ++ X_DEVS="" ++]) ++ ++AC_SUBST(DYNAMIC_CFLAGS) ++AC_SUBST(DYNAMIC_DEVS) ++AC_SUBST(DYNAMIC_FLAGS) ++AC_SUBST(DYNAMIC_LDFLAGS) ++AC_SUBST(DYNAMIC_LIBS) ++AC_SUBST(INSTALL_SHARED) ++ + dnl -------------------------------------------------- + dnl Check for library functions + dnl -------------------------------------------------- |