2004-10-16 18:07:37 +02:00
|
|
|
# New ports collection makefile for: nvu
|
|
|
|
# Date created: August 21, 2004
|
|
|
|
# Whom: Thierry Thomas <thierry@pompo.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= nvu
|
2005-06-29 09:31:38 +02:00
|
|
|
DISTVERSION= 1.0
|
2004-10-16 18:07:37 +02:00
|
|
|
CATEGORIES= www
|
2005-03-11 20:00:54 +01:00
|
|
|
MASTER_SITES= http://cvs.nvu.com/download/
|
2005-04-15 04:49:41 +02:00
|
|
|
DISTNAME= ${PORTNAME}-${DISTVERSION}-sources
|
2004-10-16 18:07:37 +02:00
|
|
|
|
2004-12-03 04:30:58 +01:00
|
|
|
MAINTAINER= ahze@FreeBSD.org
|
2004-10-16 22:37:34 +02:00
|
|
|
COMMENT= A complete Web Authoring System similar to Dreamweaver or Frontpage
|
2004-10-16 18:07:37 +02:00
|
|
|
|
2005-06-29 09:31:38 +02:00
|
|
|
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip
|
2004-10-16 22:37:34 +02:00
|
|
|
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
|
|
|
|
png.5:${PORTSDIR}/graphics/png \
|
2005-06-29 09:31:38 +02:00
|
|
|
Xft.2:${PORTSDIR}/x11-fonts/libXft
|
2004-10-16 18:07:37 +02:00
|
|
|
|
2004-12-03 04:30:58 +01:00
|
|
|
USE_X_PREFIX= yes
|
2004-10-16 18:07:37 +02:00
|
|
|
USE_BZIP2= yes
|
2004-10-16 22:37:34 +02:00
|
|
|
USE_PERL5= yes
|
|
|
|
USE_GNOME= gtk20 libidl
|
|
|
|
USE_REINPLACE= yes
|
2004-10-16 18:07:37 +02:00
|
|
|
USE_GMAKE= yes
|
2005-01-10 08:24:49 +01:00
|
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
|
|
|
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
2005-04-15 04:49:41 +02:00
|
|
|
NVU= ${PORTNAME}-${DISTVERSION}
|
2004-10-16 22:37:34 +02:00
|
|
|
FAKEDIR= ${WRKDIR}/FAKE
|
|
|
|
WRKSRC= ${WRKDIR}/mozilla
|
|
|
|
PLIST= ${WRKDIR}/plist
|
2004-10-16 18:07:37 +02:00
|
|
|
MAKEFILE= client.mk
|
|
|
|
ALL_TARGET= build_all
|
2005-01-10 08:24:49 +01:00
|
|
|
PKG_CONFIGS= nvu-gtkmozembed.pc nvu-js.pc nvu-nspr.pc \
|
|
|
|
nvu-nss.pc nvu-plugin.pc nvu-xpcom.pc
|
2005-06-29 09:31:38 +02:00
|
|
|
EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude */CVS/*
|
2005-04-15 04:49:41 +02:00
|
|
|
|
2004-10-16 22:37:34 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-01-10 08:24:49 +01:00
|
|
|
.if ${PERL_LEVEL} < 500600
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-config_make-jars.pl
|
|
|
|
.endif
|
|
|
|
|
2005-06-29 09:31:38 +02:00
|
|
|
pre-everything::
|
|
|
|
.if !defined(WITH_OPTIMIZED_CFLAGS)
|
|
|
|
@${ECHO_MSG} "Enable -O2 optimizations by defining"
|
|
|
|
@${ECHO_MSG} "WITH_OPTIMIZED_CFLAGS"
|
|
|
|
@${ECHO_MSG}
|
2004-10-16 22:37:34 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
2004-12-03 04:30:58 +01:00
|
|
|
# Remove so we can actaully find programs that are not in /usr/bin
|
|
|
|
@${RM} -f ${WRKSRC}/config.status ${WRKSRC}/config.cache
|
2005-01-10 08:24:49 +01:00
|
|
|
@${SED} -e 's|%%NVUDIR%%|${PREFIX}/lib/${NVU}|g ; \
|
|
|
|
s|%%PREFIX%%|${PREFIX}|g ; \
|
|
|
|
s|%%X11BASE%%|${X11BASE}|g' \
|
|
|
|
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
|
|
|
|
@${SED} -e 's|%%NVUDIR%%|${PREFIX}/lib/${NVU}|g' \
|
|
|
|
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
|
2004-10-16 22:37:34 +02:00
|
|
|
@${SED} -e 's|%%CC%%|${CC}|; s|%%CXX%%|${CXX}|; \
|
|
|
|
s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|; \
|
|
|
|
s|%%CFLAGS%%|${CFLAGS}|; \
|
|
|
|
s|%%CXXFLAGS%%|${CXXFLAGS}|; \
|
|
|
|
s|%%PREFIX%%|${FAKEDIR}|; \
|
|
|
|
s|%%LOCALBASE%%|${LOCALBASE}|' \
|
|
|
|
${FILESDIR}/mozconfig.in >${WRKSRC}/.mozconfig
|
2005-06-29 09:31:38 +02:00
|
|
|
# Stupid workaround..
|
2005-04-15 04:49:41 +02:00
|
|
|
.for f in toolkit/components/Makefile.in toolkit/components/gnome/Makefile.in
|
2005-06-29 09:31:38 +02:00
|
|
|
@${ECHO_CMD} "LDFLAGS += -L${LOCALBASE}/lib" >> ${WRKSRC}/${f}
|
2005-04-15 04:49:41 +02:00
|
|
|
.endfor
|
2004-10-16 22:37:34 +02:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
@${ECHO_CMD} "ac_add_options --enable-debug" >> ${WRKSRC}/.mozconfig
|
|
|
|
@${ECHO_CMD} "ac_add_options --disable-strip" >> ${WRKSRC}/.mozconfig
|
|
|
|
.else
|
|
|
|
@${ECHO_CMD} "ac_add_options --disable-debug" >> ${WRKSRC}/.mozconfig
|
|
|
|
@${ECHO_CMD} "ac_add_options --enable-strip" >> ${WRKSRC}/.mozconfig
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_OPTIMIZED_CFLAGS)
|
|
|
|
@${ECHO_CMD} "ac_add_options --enable-optimize=-O2" >> ${WRKSRC}/.mozconfig
|
|
|
|
.endif
|
|
|
|
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
|
2005-10-27 02:41:05 +02:00
|
|
|
s|-lpthread|${PTHREAD_LIBS}|g; \
|
|
|
|
s|/usr/X11R6|${X11BASE}|g' \
|
2004-10-16 22:37:34 +02:00
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/nsprpub/configure
|
|
|
|
@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' \
|
|
|
|
${WRKSRC}/nsprpub/configure \
|
|
|
|
${WRKSRC}/security/coreconf/FreeBSD.mk \
|
|
|
|
${WRKSRC}/js/src/Makefile.in
|
|
|
|
|
|
|
|
pre-install:
|
|
|
|
${RM} -rf ${PLIST} ${FAKEDIR}
|
|
|
|
${TOUCH} -f ${PLIST}
|
|
|
|
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
|
|
|
|
${MAKEFILE} ${MAKE_ARGS} install
|
|
|
|
${ECHO_CMD} bin/nvu >> ${PLIST}
|
2005-01-10 08:24:49 +01:00
|
|
|
${ECHO_CMD} bin/nvu-config >> ${PLIST}
|
2004-10-16 22:37:34 +02:00
|
|
|
cd ${FAKEDIR}/lib/${NVU} && ${FIND} -s * -type f -o -type l | \
|
|
|
|
${SED} -e 's|^|lib/${NVU}/|' >> ${PLIST} \
|
|
|
|
&& ${FIND} -d * -type d | \
|
|
|
|
${SED} -e 's:^:@dirrm lib/${NVU}/:' >> ${PLIST}
|
|
|
|
${ECHO_CMD} @dirrm lib/${NVU} >> ${PLIST}
|
|
|
|
.for p in ${PKG_CONFIGS}
|
|
|
|
${ECHO_CMD} ${p:S|^|libdata/pkgconfig/|} >> ${PLIST}
|
|
|
|
.endfor
|
|
|
|
cd ${FAKEDIR}/include/${NVU} && ${FIND} -s * -type f -o -type l | \
|
|
|
|
${SED} -e 's|^|include/${NVU}/|' >> ${PLIST} \
|
|
|
|
&& ${FIND} -d * -type d | \
|
|
|
|
${SED} -e 's|^|@dirrm include/${NVU}/|' >> ${PLIST}
|
|
|
|
${ECHO_CMD} @dirrm include/${NVU} >> ${PLIST}
|
2004-10-16 18:07:37 +02:00
|
|
|
|
2004-10-16 22:37:34 +02:00
|
|
|
do-install:
|
|
|
|
${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|' \
|
|
|
|
${FAKEDIR}/bin/* \
|
|
|
|
${FAKEDIR}/lib/pkgconfig/*
|
|
|
|
${RM} -f ${FAKEDIR}/bin/*.bak ${FAKEDIR}/lib/pkgconfig/*.bak
|
|
|
|
${MKDIR} ${PREFIX}/lib/${NVU}
|
|
|
|
${CHMOD} 755 ${PREFIX}/lib/${NVU}
|
|
|
|
${INSTALL_SCRIPT} ${FAKEDIR}/bin/* ${PREFIX}/bin
|
|
|
|
if [ ! -d ${PREFIX}/libdata/pkgconfig ]; then \
|
|
|
|
${MKDIR} ${PREFIX}/libdata/pkgconfig ; \
|
|
|
|
fi
|
|
|
|
.for i in ${PKG_CONFIGS}
|
|
|
|
${INSTALL_DATA} ${FAKEDIR}/lib/pkgconfig/${i} ${PREFIX}/libdata/pkgconfig/
|
|
|
|
.endfor
|
|
|
|
cd ${FAKEDIR}/lib/${NVU} && ${FIND} . | \
|
|
|
|
${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${NVU}
|
|
|
|
cd ${FAKEDIR}/include/${NVU} && ${FIND} . | \
|
|
|
|
${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/include/${NVU}
|
2004-10-16 18:07:37 +02:00
|
|
|
|
2005-01-10 08:24:49 +01:00
|
|
|
post-install:
|
|
|
|
.if !defined(PACKAGE_BUILDING)
|
2005-03-11 20:00:54 +01:00
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2005-01-10 08:24:49 +01:00
|
|
|
.endif
|
|
|
|
|
2004-10-16 22:37:34 +02:00
|
|
|
.include <bsd.port.post.mk>
|