Index: head/Mk/Uses/charsetfix.mk =================================================================== --- head/Mk/Uses/charsetfix.mk (revision 334391) +++ head/Mk/Uses/charsetfix.mk (revision 334392) @@ -1,29 +1,30 @@ # $FreeBSD$ # # Lookup in Makefile.in to prevent a package from installing/modifying charset.alias # # MAINTAINER: portmgr@FreeBSD.org # # Feature: charsetfix # Usage: USES=charsetfix # Valid ARGS: does not require args # # .if !defined(_INCLUDE_USES_CHARSETFIX_MK) _INCLUDE_USES_CHARSETFIX_MK= yes .if defined(charsetfix_ARGS) IGNORE= USES=charsetfix does not require args .endif CHARSETFIX_MAKEFILEIN?= Makefile.in +.PHONY: charsetfix-post-patch post-patch: charsetfix-post-patch charsetfix-post-patch: @${FIND} ${WRKSRC} -name "${CHARSETFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} \ -e 's|need_charset_alias=true|need_charset_alias=false|g ; \ s|test -f $$(charset_alias)|false|g ;\ s|test -f $$(DESTDIR)$$(libdir)/charset.alias|false|g' .endif Index: head/Mk/Uses/desktop-file-utils.mk =================================================================== --- head/Mk/Uses/desktop-file-utils.mk (revision 334391) +++ head/Mk/Uses/desktop-file-utils.mk (revision 334392) @@ -1,36 +1,37 @@ # $FreeBSD$ # # handle dependency depends on desktop-file-utils and package regen # # MAINTAINER: gnome@FreeBSD.org # # Feature: desktop-file-utils # Usage: USES=desktop-file-utils # Valid ARGS: does not require args # # .if !defined(_INCLUDE_USES_DESKTOP_FILE_UTILS_MK) _INCLUDE_USES_DESKTOP_FILE_UTILS_MK= yes .if defined(desktop-file-utils_ARGS) IGNORE= USES=desktop-file-utils does not require args .endif BUILD_DEPENDS+= update-desktop-database:${PORTSDIR}/devel/desktop-file-utils RUN_DEPENDS+= update-desktop-database:${PORTSDIR}/devel/desktop-file-utils # bolt our post-install target to post-install +.PHONY: desktop-file-post-install post-install: desktop-file-post-install desktop-file-post-install: .if defined(NO_STAGE) # run for port post-install @-update-desktop-database -q .endif # plist entries for packages. @${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-desktop-database -q > /dev/null || /usr/bin/true" \ >> ${TMPPLIST}; \ ${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-desktop-database -q > /dev/null || /usr/bin/true" \ >> ${TMPPLIST} .endif Index: head/Mk/Uses/display.mk =================================================================== --- head/Mk/Uses/display.mk (revision 334391) +++ head/Mk/Uses/display.mk (revision 334392) @@ -1,39 +1,40 @@ # $FreeBSD$ # # MAINTAINER: x11@FreeBSD.org # # Feature: display # Usage: USES=display or USES=display:ARGS # Valid ARGS: install (default, implicit), any target # # Except the target where the DISPLAY is needed # .if !defined(_INCLUDE_USES_DISPLAY_MK) _INCLUDE_USES_DISPLAY_MK= yes display_ARGS?= install .if !defined(DISPLAY) BUILD_DEPENDS+= Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver \ ${LOCALBASE}/lib/X11/fonts/misc/8x13O.pcf.gz:${PORTSDIR}/x11-fonts/xorg-fonts-miscbitmaps \ ${LOCALBASE}/lib/X11/fonts/misc/fonts.alias:${PORTSDIR}/x11-fonts/font-alias \ ${LOCALBASE}/share/X11/xkb/rules/base:${PORTSDIR}/x11/xkeyboard-config \ xkbcomp:${PORTSDIR}/x11/xkbcomp XVFBPORT!= port=0; while test -S /tmp/.X11-unix/X$${port} ; do port=$$(( port + 1 )) ; done ; ${ECHO_CMD} $$port XVFBPIDFILE= /tmp/.xvfb-${XVFBPORT}.pid MAKE_ENV+= DISPLAY=":${XVFBPORT}" +.PHONY: start-display stop-display pre-${display_ARGS}: start-display post-${display_ARGS}: stop-display start-display: daemon -p ${XVFBPIDFILE} Xvfb :${XVFBPORT} stop-display: pkill -15 -F ${XVFBPIDFILE} .endif .endif Index: head/Mk/Uses/dos2unix.mk =================================================================== --- head/Mk/Uses/dos2unix.mk (revision 334391) +++ head/Mk/Uses/dos2unix.mk (revision 334392) @@ -1,40 +1,41 @@ # $FreeBSD$ # # Provide support to convert files from dos2unix # # MAINTAINER: portmgr@FreeBSD.org # # DOS2UNIX_REGEX a regular expression to match files that needs to be converted # DOS2UNIX_FILES list of files of glob pattern relative to ${WRKSRC} # DOS2UNIX_GLOB list of glob pattern find(1) will match with .if !defined(_INCLUDE_USES_DOS2UNIX_MK) _INCLUDE_USES_DOS2UNIX_MK= yes .if !defined(DOS2UNIX_FILES) && !defined(DOS2UNIX_REGEX) && !defined(DOS2UNIX_GLOB) _DOS2UNIX_ALL= yes .endif +.PHONY: dos2unix pre-patch: dos2unix dos2unix: @${ECHO_MSG} "===> Converting DOS text files to UNIX text files" .if defined(_DOS2UNIX_ALL) @${FIND} ${WRKSRC} -type f -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' .else .if defined(DOS2UNIX_FILES) @(cd ${WRKSRC}; \ ${ECHO_CMD} ${DOS2UNIX_FILES} | ${XARGS} ${SED} -i '' -e 's/ $$//' ) .elif defined(DOS2UNIX_REGEX) @${FIND} -E ${WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' .else .for f in ${DOS2UNIX_GLOB} @${FIND} ${WRKSRC} -type f -name '${f}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' .endfor .endif .endif .endif Index: head/Mk/Uses/kmod.mk =================================================================== --- head/Mk/Uses/kmod.mk (revision 334391) +++ head/Mk/Uses/kmod.mk (revision 334392) @@ -1,55 +1,56 @@ # $FreeBSD$ # # Handles common items for kernel module ports. # # MAINTAINER: rene@FreeBSD.org # # Feature: kmod # Usage: USES=kmod # Valid ARGS: none # .if !defined(_INCLUDE_USES_KMOD_MK) _INCLUDE_USES_KMOD_MK= yes .if defined(kmod_ARGS) IGNORE= USES=kmod takes no arguments .endif .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel source files in ${SRC_BASE} .endif CATEGORIES+= kld SSP_UNSAFE= kernel module does not support SSP KMODDIR?= /boot/modules .if ${KMODDIR} == /boot/kernel KMODDIR= /boot/modules .endif PLIST_SUB+= KMODDIR="${KMODDIR:C,^/,,}" MAKE_ENV+= KMODDIR="${KMODDIR}" SYSDIR="${SRC_BASE}/sys" .if !defined(NO_STAGE) MAKE_ENV+= NO_XREF=yes .endif +.PHONY: kmod-preinstall kmod-post-install pre-install: kmod-pre-install kmod-pre-install: .if defined(NO_STAGE) ${MKDIR} ${KMODDIR} .else ${MKDIR} ${STAGEDIR}${KMODDIR} .endif post-install: kmod-post-install kmod-post-install: ${ECHO_CMD} "@exec /usr/sbin/kldxref ${KMODDIR}" >> ${TMPPLIST} ${ECHO_CMD} "@unexec /usr/sbin/kldxref ${KMODDIR}" >> ${TMPPLIST} .if defined(NO_STAGE) /usr/sbin/kldxref ${KMODDIR} .endif .if ${KMODDIR} != /boot/modules ${ECHO_CMD} "@unexec rmdir ${KMODDIR} 2>/dev/null || true" >> ${TMPPLIST} .endif .endif Index: head/Mk/Uses/pathfix.mk =================================================================== --- head/Mk/Uses/pathfix.mk (revision 334391) +++ head/Mk/Uses/pathfix.mk (revision 334392) @@ -1,37 +1,38 @@ # $FreeBSD$ # # Lookup in Makefile.in and configure for common incorrect paths and set them # to respect FreeBSD hier # # MAINTAINER: portmgr@FreeBSD.org # # Feature: pathfix # Usage: USES=pathfix # Valid ARGS: does not require args # # .if !defined(_INCLUDE_USES_PATHFIX_MK) _INCLUDE_USES_PATHFIX_MK= yes .if defined(pathfix_ARGS) IGNORE= USES=pathfix does not require args .endif PATHFIX_MAKEFILEIN?= Makefile.in +.PHONY: pathfix-pre-patch pre-patch: pathfix-pre-patch pathfix-pre-patch: @${FIND} ${WRKSRC} -name "${PATHFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} -e \ 's|[(]libdir[)]/locale|(prefix)/share/locale|g ; \ s|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[{]libdir[}]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[(]datadir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[(]prefix[)]/lib/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[$$][(]localstatedir[)]/scrollkeeper|${SCROLLKEEPER_DIR}|g ; \ s|[(]libdir[)]/bonobo/servers|(prefix)/libdata/bonobo/servers|g' ; \ ${FIND} ${WRKSRC} -name "configure" -type f | ${XARGS} ${REINPLACE_CMD} -e \ 's|DATADIRNAME=lib|DATADIRNAME=share|g ; \ s|{libdir}/locale|{prefix}/share/locale|g' .endif Index: head/Mk/Uses/shared-mime-info.mk =================================================================== --- head/Mk/Uses/shared-mime-info.mk (revision 334391) +++ head/Mk/Uses/shared-mime-info.mk (revision 334392) @@ -1,36 +1,37 @@ # $FreeBSD$ # # handle dependency depends on shared-mime-info and package regen # # MAINTAINER: gnome@FreeBSD.org # # Feature: shared-mime-info # Usage: USES=shared-mime-info # Valid ARGS: does not require args # # .if !defined(_INCLUDE_USES_SHARED_MIME_INFO_MK) _INCLUDE_USES_SHARED_MIME_INFO_MK= yes .if defined(shared-mime-info_ARGS) IGNORE= USES=shared-mime-info does not require args .endif BUILD_DEPENDS+= update-mime-database:${PORTSDIR}/misc/shared-mime-info RUN_DEPENDS+= update-mime-database:${PORTSDIR}/misc/shared-mime-info # bolt our post-install target to post-install +.PHONY: shared-mime-post-install post-install: shared-mime-post-install shared-mime-post-install: .if defined(NO_STAGE) # run for port post-install @-update-mime-database ${PREFIX}/share/mime .endif # plist entries for packages. @${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-mime-database %D/share/mime" \ >> ${TMPPLIST}; \ ${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-mime-database %D/share/mime" \ >> ${TMPPLIST} .endif Index: head/Mk/Uses/shebangfix.mk =================================================================== --- head/Mk/Uses/shebangfix.mk (revision 334391) +++ head/Mk/Uses/shebangfix.mk (revision 334392) @@ -1,57 +1,58 @@ # $FreeBSD$ # # common templates for replacing #! interpreters in scripts file # # MAINTAINER: portmgr@FreeBSD.org # # Feature: shebangfix # Usage: USES=shebangfix # # To define that the file to modify are: ${WRKSRC}/path1/file and all the .pl files in ${WRKSRC}/path2: # # SHEBANG_FILES= path1/file path2/*.pl # # To define new shebang scheme, in the port Makefile add: # # SHEBANG_LANG= lua # lua_OLD_CMD= /usr/bin/lua # lua_CMD= ${LOCALBASE}/bin/lua # # To override a definition for example replacing /usr/bin/perl by /usr/bin/env perl # add to the port Makefile: # perl_CMD= ${SETENV} perl # .if !defined(_INCLUDE_USES_SHEBANGFIX_Mk) _INCLUDE_USES_SHEBANGFIX_MK= yes bash_OLD_CMD?= /bin/bash bash_CMD?= ${LOCALBASE}/bin/bash perl_OLD_CMD?= /usr/bin/perl perl_CMD?= ${LOCALBASE}/bin/perl python_OLD_CMD?= /usr/bin/python python_CMD?= ${LOCALBASE}/bin/python ruby_OLD_CMD?= /usr/bin/ruby ruby_CMD?= ${LOCALBASE}/bin/ruby php_OLD_CMD?= /usr/bin/php php_CMD?= ${LOCALBASE}/bin/php SHEBANG_LANG+= bash perl python ruby php .for lang in ${SHEBANG_LANG} .if !defined(${lang}_CMD) IGNORE+= missing definition for ${lang}_CMD .endif .if !defined(${lang}_OLD_CMD) IGNORE+= missing definition for ${lang}_OLD_CMD .endif _SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${${lang}_OLD_CMD}|\#!${${lang}_CMD}|" .endfor +.PHONY: fix-shebang pre-patch: fix-shebang fix-shebang: @cd ${WRKSRC}; \ ${ECHO_CMD} ${SHEBANG_FILES} | ${XARGS} ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS} .endif Index: head/Mk/Uses/webplugin.mk =================================================================== --- head/Mk/Uses/webplugin.mk (revision 334391) +++ head/Mk/Uses/webplugin.mk (revision 334392) @@ -1,184 +1,185 @@ # $FreeBSD$ # # MAINTAINER= gecko@FreeBSD.org # # Documentation and examples: # # Feature: webplugin # Usage: USES=webplugin or USES=webplugin:ARGS # Valid ARGS: gecko: Support geko based plugings # native: Support gecko, opera, webkit-gtk* # linux: Support linux plugins # [list of indivudual engines]: specify browsers to use # all: All browser (implicit, default) # # USES=webplugin will create symlinks automatically for each supported # application that supports the webplugin framework. Also, it will remove # these symlinks when the plug-in port is uninstalled. # # WEBPLUGIN_NAME - If your port installs files in ${WEBPLUGIN_DIR}, # then you can tweak WEBPLUGIN_NAME to change the # name of the directory # (lib/browser_plugins/symlinks/WEBPLUGIN_NAME). # Default: WEBPLUGIN_NAME=${PKGBASE} # # WEBPLUGIN_FILES - The plug-in files that are going to be linked # in lib/browser_plugins/symlinks/*/. It cannot # be empty or the port will set IGNORE. # # WEBPLUGIN_DIR - The directory where the plug-in file(s) can be # found. Each plug-in file in WEBPLUGIN_FILES # must be found in WEBPLUGIN_DIR. If your port # does not install in WEBPLUGIN_DIR, but in its own # path, you will need to specify that here or # symlinks will be created to non-existent files. # Default: WEBPLUGIN_DIR=${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGIN_NAME} # # Makefile: # ------------------------------------------------------ # USES= webplugin:gecko # [...] # WEBPLUGIN_FILES=fooplugin.so fooplugin.xpi # # post-install: # ${MKDIR} ${STAGEDIR}${WEBPLUGIN_DIR} # ${INSTALL_DATA} ${WEBPLUGIN_FILES:S,^,${WRKSRC}/plugins/,} \ # ${STAGEDIR}${WEBPLUGIN_DIR} # # .include # ------------------------------------------------------ # # You do not need to add lib/browser_plugins and lib/browser_plugins/symlinks # in pkg-plist, because they will be removed automatically. # # pkg-plist: # ------------------------------------------------------ # [...] # %%WEBPLUGIN_DIR%%/fooplugin.so # %%WEBPLUGIN_DIR%%/fooplugin.xpi # @dirrmtry %%WEBPLUGIN_DIR%% # ------------------------------------------------------ # # Here is what it will look like when it creates the symlinks: # # ------------------------------------------------------ # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.so -> /usr/local/lib/browser_plugins/application/fooplugin.so # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.xpi -> /usr/local/lib/browser_plugins/application/fooplugin.xpi # ------------------------------------------------------ # # If your port uses libtool, and installs any *.a and *.la files, do not add # these files to WEBPLUGIN_FILES. WEBPLUGIN_FILES should be *.so or/and # *.xpi ONLY. # # Example to add in Makefile and pkg-plist if your port installs plug-ins in # its own directory, and you need to set WEBPLUGIN_DIR. # # Makefile: # ------------------------------------------------------ # [...] # USES= webplugin:gecko # WEBPLUGIN_DIR=${PREFIX}/lib/application # WEBPLUGIN_FILES=fooplugin.so fooplugin.xpi # # [...] # # .include # ------------------------------------------------------ # # As for the pkg-plist, it should only include the actual files your # port installs: # # pkg-plist: # ------------------------------------------------------ # [...] # lib/application/fooplugin.a # lib/application/fooplugin.la # lib/application/fooplugin.so # lib/application/fooplugin.xpi # @dirrm lib/application # ------------------------------------------------------ # # Here is what it will look like when it creates symlinks: # # ------------------------------------------------------ # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.so -> /usr/local/lib/application/fooplugin.so # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.xpi -> /usr/local/lib/application/fooplugin.xpi # ------------------------------------------------------ .if !defined(_INCLUDE_USES_WEBPLUGIN_MK) _INCLUDE_USES_WEBPLUGIN_MK= yes WEBPLUGIN_NAME?= ${PKGBASE} _WEBPLUGIN_APPS_ALL_LINUX= linux-firefox linux-opera linux-opera-devel \ linux-seamonkey _WEBPLUGIN_APPS_ALL_NATIVE= gecko opera opera-devel webkit-gtk2 _WEBPLUGIN_APPS_ALL= ${_WEBPLUGIN_APPS_ALL_LINUX} \ ${_WEBPLUGIN_APPS_ALL_NATIVE} webplugin_ARGS?= all _WEBPLUGIN_ARGS= ${webplugin_ARGS:C/,/ /} _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL} .if ${_WEBPLUGIN_ARGS} == all _WEBPLUGIN_PATTERN= * .elif ${_WEBPLUGIN_ARGS} == native _WEBPLUGIN_PATTERN= * _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL_NATIVE} .elif ${_WEBPLUGIN_ARGS} == linux _WEBPLUGIN_PATTERN= * _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL_LINUX} .else _WEBPLUGIN_PATTERN= ${_WEBPLUGIN_ARGS} .endif .if !defined(WEBPLUGIN_FILES) IGNORE= Cannot be installed: WEBPLUGIN_FILES is empty. Please, add plug-in files to it .endif .for _TEMP_APP__ in ${_WEBPLUGIN_APPS_ALL} _TEMP_APP_=${_TEMP_APP__} _TEMP_FLAG_=0 . for _TEMP_USE__ in ${USE_webplugin} _TEMP_USE_=${_TEMP_USE__} . if !${_TEMP_APP_:C!${_TEMP_USE_:S/*/.*/:S/?/./}!!} || \ ( ${_TEMP_APP_:Mlinux-*} && ${_TEMP_USE_:Mlinux} ) || \ ( ${_TEMP_APP_:Nlinux-*} && ${_TEMP_USE_:Mnative} ) _TEMP_FLAG_=1 . endif . endfor . if ${_TEMP_FLAG_} USE_WEBPLUGIN_EXP+= ${_TEMP_APP__} . endif .endfor .for p in ${_WEBPLUGIN_PATTERN} _WEBPLUGIN_MATCHED+= ${_WEBPLUGIN_TEST:M${p}} .endfor _WEBPLUGIN_LIBDIR= ${LOCALBASE}/lib/browser_plugins _WEBPLUGIN_SLDIR= ${_WEBPLUGIN_LIBDIR}/symlinks _WEBPLUGIN_SLDIRS= ${_WEBPLUGIN_MATCHED:S.^.${_WEBPLUGIN_SLDIR}/.} _WEBPLUGIN_APPS= ${USE_WEBPLUGIN_EXP:S.^.${LOCALBASE}/lib/.:S.$./plugins.:N*opera*:N*gecko*:N*webkit*} _WEBPLUGIN_LINKFARMS= ${_WEBPLUGIN_APPS} ${_WEBPLUGIN_SLDIRS} WEBPLUGIN_DIR?= ${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGIN_NAME} PLIST_SUB+= WEBPLUGIN_DIR="${WEBPLUGIN_DIR:S,^${PREFIX}/,,}" +.PHONY: webplugin-post-install webplugin-post-install: @${ECHO_CMD} "@cwd ${LOCALBASE}" >> ${TMPPLIST} .for d in ${_WEBPLUGIN_LINKFARMS} ${INSTALL} -d ${STAGEDIR}${d} .for l in ${WEBPLUGIN_FILES} ${LN} -sf ${l:S,^,${WEBPLUGIN_DIR}/,} ${STAGEDIR}${d}/ @${ECHO_CMD} "${d:S,^${LOCALBASE}/,,}/${l:T}" >> ${TMPPLIST} .endfor @${ECHO_CMD} "@unexec rmdir ${d:S,^${LOCALBASE},%D,} 2>/dev/null || true" >> ${TMPPLIST} .endfor @${ECHO_CMD} "@unexec rmdir ${_WEBPLUGIN_SLDIR:S,^${LOCALBASE},%D,} 2>/dev/null || true" >> ${TMPPLIST} @${ECHO_CMD} "@unexec rmdir ${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE},%D,} 2>/dev/null || true" >> ${TMPPLIST} post-install: webplugin-post-install .endif