mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
6140d3c6aa
a last resort. - Construct a list of DISTFILES for every architecture (amd64, i386). Select one list for regular make and all lists for make makesum so linux ports can have one combined distinfo file. - Set DIST_SUBDIR?=centos so there's only one copy of common distfiles. - Use MASTER_SITES and DISTFILES groups so make fetch is a bit smarter. - Regenerate all distinfo files. - For linux_base-c6 (just like linux_base-c7 already does) turn bin, lib, lib64 and sbin into symbolic links to the same directory under usr. This fixes the problem where some programs/libraries exist under / on FreeBSD and /usr on Linux or vice versa and then depending on the order of search paths Linux programs may run/load FreeBSD programs/libraries and fail. - Turn usr/share/icons into a symbolic link to LOCALBASE/share/icons so Linux programs can find desktop theme icons. This eliminates the need for x11-themes/linux*-hicolor-icon-theme. - Rename pkg-plist.x86_64 to pkg-plist.amd64. - Regenerate all pkg-plist files. - Add @preexec to linux_base pkg-plist that moves existing files in bin, lib, lib64, sbin and icons to the new destination before the directories are turned into symbolic links. - Remove several empty directories from linux_base ports. - Sweep over all linux ports: use consistent style, remove old CONFLICTS, remove unused pkg-descr files, add NLS option,... - Remove old linux arts, esound and openssl-compat ports.
104 lines
3.2 KiB
Makefile
104 lines
3.2 KiB
Makefile
# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
CATEGORIES+= linux
|
|
MASTER_SITES?= MOZILLA/${PORTNAME}/releases/${PORTVERSION}esr/linux-i686/en-US
|
|
PKGNAMEPREFIX?= linux-
|
|
|
|
USES+= cpe linux
|
|
CPE_VENDOR?= mozilla
|
|
CPE_TARGET_SW?= linux
|
|
USE_LINUX+= alsalib alsa-plugins-oss atk dbusglib dbuslibs \
|
|
fontconfig gtk2 pango
|
|
NO_BUILD= yes
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
APP_NAME= ${PKGBASE}
|
|
BIN_NAME?= ${PORTNAME}
|
|
|
|
WRKSRC?= ${WRKDIR}/${BIN_NAME}
|
|
FDIR= ${STAGEDIR}${PREFIX}/lib/${APP_NAME}
|
|
COMMON_DIR= ${.CURDIR}/../../www/linux-seamonkey
|
|
|
|
APP_ENV+= MOZ_CRASHREPORTER_DISABLE=1
|
|
|
|
PLIST_SUB+= APP_NAME=${APP_NAME}
|
|
SUB_LIST+= APP_NAME=${APP_NAME}
|
|
SUB_FILES= ${APP_NAME}.desktop
|
|
PREFS_FILE?= ${WRKSRC}/defaults/pref/browser-prefs.js
|
|
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX:M*devel*}
|
|
DESKTOP_SUFFIX?= (Linux, devel)
|
|
.endif
|
|
DESKTOP_SUFFIX?= (Linux)
|
|
|
|
_A= >> ${TMPPLIST}
|
|
_Q= 2>/dev/null || true
|
|
|
|
.if !target(post-extract)
|
|
post-extract:
|
|
@${RM} -r ${WRKSRC}/updates
|
|
@${LN} -sf ${LOCALBASE}/lib/browser_plugins/symlinks/${APP_NAME} \
|
|
${WRKSRC}/${APP_SUBDIR}plugins
|
|
.endif
|
|
|
|
|
|
.if !target(post-patch)
|
|
post-patch:
|
|
@${MKDIR} ${PREFS_FILE:H}
|
|
|
|
# disable SSL 3.0 per bug 1076983
|
|
${ECHO} 'pref("security.tls.version.min", 1);' >> ${PREFS_FILE}
|
|
.endif
|
|
|
|
.if !target(do-install)
|
|
do-install:
|
|
@${INSTALL_DATA} ${WRKDIR}/${APP_NAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/
|
|
@${CP} -pR ${WRKSRC}/ ${FDIR}/
|
|
@${PRINTF} '#! /bin/sh\n${APP_ENV} \
|
|
${PREFIX}/lib/${APP_NAME}/${BIN_NAME} "$$@"\n' \
|
|
>>${STAGEDIR}${PREFIX}/bin/${APP_NAME}
|
|
@${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${APP_NAME}
|
|
@${CP} -R ${LOCALBASE}/lib/xpi/symlinks/${APP_NAME}/ \
|
|
${FDIR}/${APP_SUBDIR}extensions/ ${_Q}
|
|
.endif
|
|
|
|
# Keep empty directories with pkg_* tools
|
|
.if !target(post-extract-script)
|
|
post-extract-script:
|
|
@if [ "${PKG_BIN:T}" != "pkg-static" ]; then \
|
|
for d in $$(${FIND} ${WRKSRC} -type d -empty); do \
|
|
${TOUCH} $$d/.keep_me; \
|
|
${ECHO_CMD} lib/${APP_NAME}/$${d#${WRKSRC}/}/.keep_me \
|
|
>> ${WRKDIR}/.PLIST.opkg; \
|
|
done; \
|
|
fi
|
|
.endif
|
|
|
|
.if !target(post-install-script)
|
|
post-install-script:
|
|
@if [ -f ${WRKDIR}/.PLIST.opkg ]; then \
|
|
${CAT} ${TMPPLIST} >> ${WRKDIR}/.PLIST.opkg; \
|
|
${MV} ${WRKDIR}/.PLIST.opkg ${TMPPLIST}; \
|
|
fi
|
|
.endif
|
|
|
|
# Maintainer section
|
|
create-plist: build
|
|
${ECHO_CMD} bin/%%APP_NAME%% > ${PLIST}
|
|
${ECHO_CMD} share/applications/%%APP_NAME%%.desktop >> ${PLIST}
|
|
cd ${WRKSRC} && ${FIND} -s . -type f -or -type l | \
|
|
${SED} -e "s#^\.#lib/%%APP_NAME%%#" | ${SORT} >> ${PLIST}
|
|
${ECHO_CMD} '@exec ${CP} -R %%LOCALBASE%%/lib/xpi/symlinks/%%APP_NAME%%/ \
|
|
%D/lib/%%APP_NAME%%/${APP_SUBDIR}extensions/ ${_Q}' >> ${PLIST}
|
|
${ECHO_CMD} '@unexec ${FIND} %D/lib/%%APP_NAME%%/${APP_SUBDIR}extensions/ \
|
|
-depth 1 -type l -delete ${_Q}' >> ${PLIST}
|
|
|
|
snatch-desktop:
|
|
${SED} -E -e 's/${PORTNAME}/${APP_NAME}/' \
|
|
-e "s,@MOZILLA_NAME@,$$(echo ${PORTNAME} | ${SED} 's/\b./\u&/g')," \
|
|
-e 's/@MOZILLA@|%%MOZILLA%%/${APP_NAME}/' \
|
|
-e 's/^(Name.*=.+)$$/\1 ${DESKTOP_SUFFIX}/' \
|
|
-e 's/^(GenericName.*=.+)$$/\1 ${DESKTOP_SUFFIX}/' \
|
|
-e 's!^Icon=.*$$!Icon=%%PREFIX%%/lib/%%APP_NAME%%/chrome/icons/default/default.xpm!' \
|
|
${PORTSDIR}/${PKGCATEGORY}/${PORTNAME}/files/${PORTNAME}.desktop.in > \
|
|
${FILESDIR}/${APP_NAME}.desktop.in
|