Date: Tue, 21 Jan 2014 02:03:05 +0000 From: Alexey Dokuchaev <danfe@FreeBSD.org> To: gnome@FreeBSD.org Subject: [patch] x11-toolkits/gtk20: modernize/cleanup makefile Message-ID: <20140121020305.GA41760@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
--KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi there, please consider attached patch, which fixes installation prefix for manpages (should go to MANPREFIX, not PREFIX), sorts the USES and USE_* knobs, makes use of OPTIONS helpers, and drops superfluous quotes to make the line fit in 80-char screen. ./danfe --KsGdsel6WgEHnImy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="gtk20.diff" Index: Makefile =================================================================== --- Makefile (revision 340541) +++ Makefile (working copy) @@ -27,11 +27,11 @@ ${LOCALBASE}/share/icons/hicolor/index.theme:${PORTSDIR}/misc/hicolor-icon-theme \ python:${PORTSDIR}/lang/python -USE_LDCONFIG= yes +USES= gettext gmake pathfix perl5 pkgconfig GNU_CONFIGURE= yes USE_GNOME= atk pango gdkpixbuf2 introspection:build ltverhack \ gtk-update-icon-cache -USES= gettext gmake pathfix pkgconfig perl5 +USE_LDCONFIG= yes USE_PERL5= build USE_XORG= xext xrender x11 xinerama xi xrandr xcursor xfixes xdamage \ xcomposite @@ -41,24 +41,17 @@ OPTIONS_DEFINE= CUPS DEBUG OPTIONS_DEFAULT=CUPS +OPTIONS_SUB= yes +CUPS_LIB_DEPENDS= libcups.so:${PORTSDIR}/print/cups-client +CUPS_CONFIGURE_ON= --enable-cups=auto +CUPS_CONFIGURE_OFF= --disable-cups +DEBUG_CONFIGURE_ON= --enable-debug=yes + .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MCUPS} -LIB_DEPENDS+= libcups.so:${PORTSDIR}/print/cups-client -CONFIGURE_ARGS+=--enable-cups=auto -PLIST_SUB+= CUPS:="" -.else -CONFIGURE_ARGS+=--disable-cups -PLIST_SUB+= CUPS:="@comment " -.endif - -.if ${PORT_OPTIONS:MDEBUG} -CONFIGURE_ARGS+=--enable-debug=yes -.endif - post-patch: - @${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${GREP} -l lgmodule | \ + @${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${GREP} -l lgmodule | \ ${XARGS} ${REINPLACE_CMD} -e 's|-lgmodule|@GMODULE_LIBS@|g' @${REINPLACE_CMD} -e 's|[{]libdir[}]/locale|{datadir}/locale|g' \ ${WRKSRC}/configure @@ -81,7 +74,7 @@ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/gtk-2.0/${GTK2_VERSION}/loaders @${MKDIR} ${STAGEDIR}${PREFIX}/lib/gtk-2.0/${GTK2_VERSION}/modules ${INSTALL_MAN} ${WRKSRC}/docs/reference/gtk/gtk-query-immodules-2.0.1 \ - ${STAGEDIR}${PREFIX}/man/man1 + ${STAGEDIR}${MANPREFIX}/man/man1 .include <bsd.port.mk> Index: pkg-plist =================================================================== --- pkg-plist (revision 340541) +++ pkg-plist (working copy) @@ -288,8 +288,8 @@ lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-viqr.so lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-xim.la lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-xim.so -%%CUPS:%%lib/gtk-2.0/%%GTK2_VERSION%%/printbackends/libprintbackend-cups.la -%%CUPS:%%lib/gtk-2.0/%%GTK2_VERSION%%/printbackends/libprintbackend-cups.so +%%CUPS%%lib/gtk-2.0/%%GTK2_VERSION%%/printbackends/libprintbackend-cups.la +%%CUPS%%lib/gtk-2.0/%%GTK2_VERSION%%/printbackends/libprintbackend-cups.so lib/gtk-2.0/%%GTK2_VERSION%%/printbackends/libprintbackend-file.la lib/gtk-2.0/%%GTK2_VERSION%%/printbackends/libprintbackend-file.so lib/gtk-2.0/%%GTK2_VERSION%%/printbackends/libprintbackend-lpr.la --KsGdsel6WgEHnImy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140121020305.GA41760>