Date: Wed, 20 Mar 2002 02:19:28 +0300 (MSK) From: "Lev A. Serebryakov" <lev@serebryakov.spb.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/36112: [PATCH] New feature for whole ports tree: GS_PORT variable Message-ID: <200203192319.g2JNJSU39082@ftp.translate.ru>
next in thread | raw e-mail | index | archive | help
>Number: 36112 >Category: ports >Synopsis: [PATCH] New feature for whole ports tree: GS_PORT variable >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 19 15:20:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Lev A. Serebryakov <lev@serebryakov.spb.ru> >Release: FreeBSD 4.4-STABLE i386 >Organization: >Environment: System: FreeBSD freebsd.sereb.net 4.4-STABLE FreeBSD 4.4-STABLE #1: Sat Dec 8 13:48:40 MSK 2001 root@freebsd.sereb.net:/usr/obj/usr/src/sys/LEVMAIL i386 Ports collection: 20 Mar 2002 >Description: Many ports depends on GhostScript (`gs' binary). FreeBSD has four common variants of ghostscript and some national ones in its ports tree. All ports depends on `print/ghostscript-gnu' variant. It is not so good, IMHO. For example, I don't have any X on my print server, and I want to have some GS-depended ports on it. `pkgdb -F' from sysutils/portupgrade port could fix broken dependences, but, I think, it will be better to have two variables: GS_PORT and GS_PORTSUFFIX in makefile (Mk/bsd.port.mk). User could overwrite them in /etc/make.conf. Default values for this variables should be `print/ghostscript-gnu' and `'. Any ghostrscript-depended port should reference to ghostscript port like this: RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} We need two variables, because some ports want to reference `-nox11' variant in any case (graphics/ImageMagic is good example). In such rare cases port could overwrite standard (system-wide) GS_PORTSUFFIX: RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}-nox11 And national ports could overwrite GS_PORT (and GS_PORTSUFFIX will be system-wide). Here is a patch, which add variables to Mk/bsd.port.mk and changes Makefiles for every ghostscript-depended port. I don't touch any PORTVERSIONS. I think, it will be good to mention these variables in some documentation. I think about similar APACHE_PORT feature :) >How-To-Repeat: >Fix: diff -ruN ports/Mk/bsd.port.mk ports.new/Mk/bsd.port.mk --- ports/Mk/bsd.port.mk Wed Mar 20 01:39:46 2002 +++ ports.new/Mk/bsd.port.mk Wed Mar 20 01:46:06 2002 @@ -794,6 +794,10 @@ XFREE86_VERSION?= 3 .endif +#default to print/ghostscript-gnu and `' +GS_PORT?= print/ghostscript-gnu +GS_PORTSUFFIX?= "" + .endif # End of pre-makefile section. diff -ruN ports/cad/xcircuit/Makefile ports.new/cad/xcircuit/Makefile --- ports/cad/xcircuit/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/cad/xcircuit/Makefile Wed Mar 20 01:47:00 2002 @@ -14,7 +14,7 @@ MAINTAINER= ports@FreeBSD.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} BUILD_DEPENDS= gm4:${PORTSDIR}/devel/m4 USE_BZIP2= yes diff -ruN ports/chinese/moefonts-cid/Makefile ports.new/chinese/moefonts-cid/Makefile --- ports/chinese/moefonts-cid/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/chinese/moefonts-cid/Makefile Wed Mar 20 01:48:16 2002 @@ -15,7 +15,7 @@ MAINTAINER= keith@FreeBSD.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} NO_BUILD= YES diff -ruN ports/comms/tkhylafax/Makefile ports.new/comms/tkhylafax/Makefile --- ports/comms/tkhylafax/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/comms/tkhylafax/Makefile Wed Mar 20 01:47:01 2002 @@ -14,7 +14,7 @@ RUN_DEPENDS= wish8.2:${PORTSDIR}/x11-toolkits/tk82 \ sendfax:${PORTSDIR}/comms/hylafax \ - gs:${PORTSDIR}/print/ghostscript-gnu \ + gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ gv:${PORTSDIR}/print/gv WRKSRC= ${WRKDIR}/tkhylafax-3.0 diff -ruN ports/devel/doc++/Makefile ports.new/devel/doc++/Makefile --- ports/devel/doc++/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/devel/doc++/Makefile Wed Mar 20 01:47:05 2002 @@ -15,7 +15,7 @@ MAINTAINER= Ruslan@Shevchenko.Kiev.UA RUN_DEPENDS= tex:${PORTSDIR}/print/teTeX \ - gs:${PORTSDIR}/print/ghostscript-gnu \ + gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ anytopnm:${PORTSDIR}/graphics/netpbm GNU_CONFIGURE= yes diff -ruN ports/graphics/ImageMagick/Makefile ports.new/graphics/ImageMagick/Makefile --- ports/graphics/ImageMagick/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/graphics/ImageMagick/Makefile Wed Mar 20 01:47:23 2002 @@ -103,15 +103,15 @@ .if defined(WITHOUT_X11) PKGNAMESUFFIX+= -nox11 -BUILD_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu-nox11 -RUN_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu-nox11 +BUILD_DEPENDS+= gs:${PORTSDIR}/${GS_PORT}-nox11 +RUN_DEPENDS+= gs:${PORTSDIR}/${GS_PORT}-nox11 CONFIGURE_ARGS+= --without-x --without-mpeg2 --without-wmf PLIST_SUB+= X11='@comment ' .else LIB_DEPENDS+= mpeg2:${PORTSDIR}/graphics/libmpeg2 \ wmf.2:${PORTSDIR}/graphics/libwmf -BUILD_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu -RUN_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu +BUILD_DEPENDS+= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} +RUN_DEPENDS+= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} USE_XLIB= yes MAN1+= animate.1 display.1 import.1 PLIST_SUB+= X11='' diff -ruN ports/graphics/eps2png/Makefile ports.new/graphics/eps2png/Makefile --- ports/graphics/eps2png/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/graphics/eps2png/Makefile Wed Mar 20 01:47:27 2002 @@ -14,7 +14,7 @@ MAINTAINER= nik@freebsd.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} PERL_CONFIGURE= yes diff -ruN ports/graphics/epstool/Makefile ports.new/graphics/epstool/Makefile --- ports/graphics/epstool/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/graphics/epstool/Makefile Wed Mar 20 01:47:26 2002 @@ -13,7 +13,7 @@ MAINTAINER= ports@FreeBSD.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} WRKSRC= ${WRKDIR}/${PORTNAME} diff -ruN ports/graphics/ipe/Makefile ports.new/graphics/ipe/Makefile --- ports/graphics/ipe/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/graphics/ipe/Makefile Wed Mar 20 01:47:27 2002 @@ -14,7 +14,7 @@ MAINTAINER= bremner@unb.ca -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu \ +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ latex:${PORTSDIR}/print/teTeX USE_XLIB= yes diff -ruN ports/graphics/kdegraphics2/Makefile ports.new/graphics/kdegraphics2/Makefile --- ports/graphics/kdegraphics2/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/graphics/kdegraphics2/Makefile Wed Mar 20 01:47:26 2002 @@ -17,7 +17,7 @@ BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \ automake14:${PORTSDIR}/devel/automake14 -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} USE_KDELIBS_VER=2 USE_BZIP2= yes diff -ruN ports/graphics/peps/Makefile ports.new/graphics/peps/Makefile --- ports/graphics/peps/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/graphics/peps/Makefile Wed Mar 20 01:47:24 2002 @@ -12,7 +12,7 @@ MAINTAINER= petef@FreeBSD.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu \ +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ pnmtopng:${PORTSDIR}/graphics/netpbm post-patch: diff -ruN ports/graphics/pstoedit/Makefile ports.new/graphics/pstoedit/Makefile --- ports/graphics/pstoedit/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/graphics/pstoedit/Makefile Wed Mar 20 01:47:25 2002 @@ -17,7 +17,7 @@ LIB_DEPENDS= ming.3:${PORTSDIR}/graphics/ming \ plot.4:${PORTSDIR}/graphics/plotutils \ plotter.4:${PORTSDIR}/graphics/plotutils -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION}/src diff -ruN ports/mbone/wb/Makefile ports.new/mbone/wb/Makefile --- ports/mbone/wb/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/mbone/wb/Makefile Wed Mar 20 01:47:39 2002 @@ -18,7 +18,7 @@ USE_X_PREFIX= yes # XXX ghostscript, ghostscript3, ghostscript4 or ghostscript5 will all do. -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} .include <bsd.port.pre.mk> diff -ruN ports/print/apsfilter/Makefile ports.new/print/apsfilter/Makefile --- ports/print/apsfilter/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/print/apsfilter/Makefile Wed Mar 20 01:47:51 2002 @@ -44,9 +44,9 @@ # # ps emulator .if defined(WITHOUT_X11) -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu-nox11 +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}-nox11 .else -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} .endif # all needed decompression utilities .if !exists(/usr/bin/bzip2) @@ -96,9 +96,9 @@ # # ps emulator .if defined(WITHOUT_X11) -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu-nox11 +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}-nox11 .else -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} .endif # most important "xxx to ps" filter utilities RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter diff -ruN ports/print/ggv/Makefile ports.new/print/ggv/Makefile --- ports/print/ggv/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/print/ggv/Makefile Wed Mar 20 01:47:51 2002 @@ -14,7 +14,7 @@ MAINTAINER= gnome@FreeBSD.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} USE_X_PREFIX= yes USE_GNOME= yes diff -ruN ports/print/ghostscript-gnu-cjk/Makefile ports.new/print/ghostscript-gnu-cjk/Makefile --- ports/print/ghostscript-gnu-cjk/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/print/ghostscript-gnu-cjk/Makefile Wed Mar 20 01:47:53 2002 @@ -28,7 +28,7 @@ BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} USE_BZIP2= yes USE_XLIB= yes diff -ruN ports/print/gnomeprint/Makefile ports.new/print/gnomeprint/Makefile --- ports/print/gnomeprint/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/print/gnomeprint/Makefile Wed Mar 20 01:47:51 2002 @@ -16,7 +16,7 @@ BUILD_DEPENDS= freetype-config:${PORTSDIR}/print/freetype2 # XXX LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} PLIST_SUB= VERSION=${PORTVERSION} diff -ruN ports/print/html2ps-letter/Makefile ports.new/print/html2ps-letter/Makefile --- ports/print/html2ps-letter/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/print/html2ps-letter/Makefile Wed Mar 20 01:47:51 2002 @@ -17,7 +17,7 @@ BUILD_DEPENDS= mogrify:${PORTSDIR}/graphics/ImageMagick \ djpeg:${PORTSDIR}/graphics/jpeg \ giftopnm:${PORTSDIR}/graphics/netpbm \ - gs:${PORTSDIR}/print/ghostscript-gnu \ + gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ tex:${PORTSDIR}/print/teTeX \ ${site_perl}/LWP.pm:${PORTSDIR}/www/p5-libwww \ weblint:${PORTSDIR}/www/weblint diff -ruN ports/print/magicfilter/Makefile ports.new/print/magicfilter/Makefile --- ports/print/magicfilter/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/print/magicfilter/Makefile Wed Mar 20 01:47:52 2002 @@ -14,9 +14,9 @@ MAINTAINER= cjh@FreeBSD.org # at least, gs must exist in many case -BUILD_DEPENDS= ${PREFIX}/bin/gs:${PORTSDIR}/print/ghostscript-gnu +BUILD_DEPENDS= ${PREFIX}/bin/gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} # to give freedom to choose your favor gs.. -#RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +#RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} GNU_CONFIGURE= yes USE_GMAKE= yes diff -ruN ports/print/pnm2ppa/Makefile ports.new/print/pnm2ppa/Makefile --- ports/print/pnm2ppa/Makefile Wed Mar 20 01:39:46 2002 +++ ports.new/print/pnm2ppa/Makefile Wed Mar 20 01:47:53 2002 @@ -14,7 +14,7 @@ MAINTAINER= ports@FreeBSD.org LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu \ +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ enscript:${PORTSDIR}/print/enscript-letter MAN1= pnm2ppa.1 diff -ruN ports/print/preview-latex/Makefile ports.new/print/preview-latex/Makefile --- ports/print/preview-latex/Makefile Wed Mar 20 01:39:47 2002 +++ ports.new/print/preview-latex/Makefile Wed Mar 20 01:47:53 2002 @@ -15,9 +15,9 @@ MAINTAINER= yoichi@FreeBSD.org BUILD_DEPENDS= ${LOCALBASE}/${EMACS_SITE_LISPDIR}/auctex/latex.el:${PORTSDIR}/print/auctex \ - gs:${PORTSDIR}/print/ghostscript-gnu + gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} RUN_DEPENDS= ${LOCALBASE}/${EMACS_SITE_LISPDIR}/auctex/latex.el:${PORTSDIR}/print/auctex \ - gs:${PORTSDIR}/print/ghostscript-gnu + gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} EMACS_PORT_NAME?= emacs21 diff -ruN ports/print/pstotext/Makefile ports.new/print/pstotext/Makefile --- ports/print/pstotext/Makefile Wed Mar 20 01:39:47 2002 +++ ports.new/print/pstotext/Makefile Wed Mar 20 01:47:52 2002 @@ -14,7 +14,7 @@ MAINTAINER= ob@breuninger.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} MAN1= pstotext.1 diff -ruN ports/textproc/latex2html/Makefile ports.new/textproc/latex2html/Makefile --- ports/textproc/latex2html/Makefile Wed Mar 20 01:39:47 2002 +++ ports.new/textproc/latex2html/Makefile Wed Mar 20 01:47:58 2002 @@ -20,7 +20,7 @@ # BUILD_DEPENDS= ${LOCALBASE}/bin/latex:${PORTSDIR}/print/teTeX \ - ${LOCALBASE}/bin/gs:${PORTSDIR}/print/ghostscript-gnu \ + ${LOCALBASE}/bin/gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ ${LOCALBASE}/bin/anytopnm:${PORTSDIR}/graphics/netpbm RUN_DEPENDS= ${BUILD_DEPENDS} diff -ruN ports/textproc/tth/Makefile ports.new/textproc/tth/Makefile --- ports/textproc/tth/Makefile Wed Mar 20 01:39:47 2002 +++ ports.new/textproc/tth/Makefile Wed Mar 20 01:47:59 2002 @@ -16,7 +16,7 @@ MAINTAINER= ports@FreeBSD.org -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu \ +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} \ latex:${PORTSDIR}/print/teTeX \ ppmtogif:${PORTSDIR}/graphics/netpbm diff -ruN ports/x11/dgs/Makefile ports.new/x11/dgs/Makefile --- ports/x11/dgs/Makefile Wed Mar 20 01:39:47 2002 +++ ports.new/x11/dgs/Makefile Wed Mar 20 01:48:07 2002 @@ -16,7 +16,7 @@ LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ png.5:${PORTSDIR}/graphics/png \ tiff.4:${PORTSDIR}/graphics/tiff -RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu +RUN_DEPENDS= gs:${PORTSDIR}/${GS_PORT}${GS_PORTSUFFIX} USE_X_PREFIX= yes USE_GMAKE= yes >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203192319.g2JNJSU39082>