2001-03-10 13:51:40 +00:00
|
|
|
# New ports collection makefile for: lib
|
|
|
|
# Date Created: 19 September 2000
|
|
|
|
# Whom: nra
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= libh
|
2001-12-21 23:29:13 +00:00
|
|
|
PORTVERSION= 0.2.1
|
2001-03-10 13:51:40 +00:00
|
|
|
CATEGORIES= misc
|
2001-04-24 18:02:56 +00:00
|
|
|
# ${MASTER_SITES} is unavailable for CVS only projects.
|
|
|
|
# MASTER_SITES= ${MASTER_SITE_LOCAL}
|
2001-03-10 13:51:40 +00:00
|
|
|
|
|
|
|
MAINTAINER= nra@FreeBSD.org
|
|
|
|
|
|
|
|
LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \
|
|
|
|
tvision.0:${PORTSDIR}/devel/tvision
|
2001-03-25 04:18:47 +00:00
|
|
|
BUILD_DEPENDS= ${X11BASE}/lib/libqt2.a:${PORTSDIR}/x11-toolkits/qt2-static
|
2001-03-10 13:51:40 +00:00
|
|
|
|
2001-04-03 08:14:43 +00:00
|
|
|
USE_QT_VER= 2
|
|
|
|
IS_INTERACTIVE= yes
|
|
|
|
INSTALLS_SHLIB= yes
|
2001-03-10 13:51:40 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2001-12-21 23:29:13 +00:00
|
|
|
# we could also use the makedistfiles method here
|
2001-03-10 13:51:40 +00:00
|
|
|
DISTFILES!= ${CAT} ${FILESDIR}/distfiles
|
|
|
|
|
|
|
|
CVS_CMD?= cvs -z3
|
|
|
|
# arbitrary date for now.
|
2001-12-21 23:29:13 +00:00
|
|
|
CVS_DATE= Thu December 21 18:20:00 GMT 2001
|
2002-01-29 11:48:57 +00:00
|
|
|
CVS_DATE_!= ${ECHO_CMD} -n "${CVS_DATE}" | ${SED} 's/[ \t:]/_/g'
|
2001-03-10 13:51:40 +00:00
|
|
|
CVS_SITES?= :pserver:anonymous@usw4.freebsd.org:/home/libh/cvs
|
2001-12-21 23:29:13 +00:00
|
|
|
STAMPFILE= ${DISTDIR}/${DISTNAME}/.stamp
|
2001-03-10 13:51:40 +00:00
|
|
|
|
2001-12-21 23:29:13 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
|
|
|
|
|
|
|
# until we find a way of including ${WRKSRC}/${PORTNAME}/Makefile.uitype
|
|
|
|
# only after "extract"
|
|
|
|
UITYPE= text+graphics
|
2001-03-10 13:51:40 +00:00
|
|
|
|
|
|
|
.if defined(BATCH)
|
|
|
|
do-fetch: fetchsrctarball
|
|
|
|
.else
|
|
|
|
do-fetch:
|
|
|
|
@if [ ! -f ${STAMPFILE} ] || \
|
|
|
|
[ "X${CVS_DATE}" != "X$$(${CAT} ${STAMPFILE})" ]; then \
|
|
|
|
${ECHO_MSG} "No stamp file (or out of date)"; \
|
2001-12-21 23:29:13 +00:00
|
|
|
if [ -f ${DISTDIR}/${DISTNAME}.${CVS_DATE_}.tar.gz ]; then \
|
2001-03-10 13:51:40 +00:00
|
|
|
cd ${DISTDIR}; \
|
2001-12-21 23:29:13 +00:00
|
|
|
${TAR} xfz ${DISTNAME}.${CVS_DATE_}.tar.gz \
|
2001-03-10 13:51:40 +00:00
|
|
|
${DISTFILES}; \
|
2002-01-29 11:48:57 +00:00
|
|
|
${ECHO_CMD} -n "${CVS_DATE}" > ${STAMPFILE}; \
|
2001-03-10 13:51:40 +00:00
|
|
|
exit; \
|
|
|
|
fi; \
|
|
|
|
unset CVS_RSH CVS_SERVER CVS_LOGIN || ${TRUE}; \
|
|
|
|
if [ -n "${PORTS_CVS_RSH}" ]; then \
|
|
|
|
export CVS_RSH="${PORTS_CVS_RSH}"; \
|
|
|
|
fi; \
|
|
|
|
if [ -n "${PORTS_CVS_SERVER}" ]; then \
|
|
|
|
export CVS_SERVER="${PORTS_CVS_SERVER}"; \
|
|
|
|
fi; \
|
|
|
|
${MKDIR} ${DISTDIR}/${PKGNAME} && \
|
|
|
|
cd ${DISTDIR}/${PKGNAME}; \
|
|
|
|
for CVS_SITE in ${CVS_SITES}; do \
|
|
|
|
${ECHO_MSG} ">> Attempting to CVS cvs checkout from $${CVS_SITE}."; \
|
|
|
|
case "$${CVS_SITE}" in \
|
|
|
|
:pserver:*) \
|
|
|
|
CVS_LOGIN=yes; \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
CVS_LOGIN=no; \
|
|
|
|
;; \
|
|
|
|
esac; \
|
|
|
|
if [ "X$${CVS_LOGIN}" = "Xyes" ]; then \
|
|
|
|
${ECHO_MSG} ">> *** Please hit enter here for the password."; \
|
|
|
|
${CVS_CMD} -d $${CVS_SITE} login < /dev/null; \
|
|
|
|
fi ; \
|
2001-12-21 23:29:13 +00:00
|
|
|
if ${CVS_CMD} -d $${CVS_SITE} co -D '${CVS_DATE}' ${PORTNAME}; then \
|
2001-03-10 13:51:40 +00:00
|
|
|
if [ "X$${CVS_LOGIN}" = "Xyes" ]; then \
|
|
|
|
${CVS_CMD} -d $${CVS_SITE} logout < /dev/null; \
|
|
|
|
fi; \
|
2002-01-29 11:48:57 +00:00
|
|
|
${ECHO_CMD} -n ${CVS_DATE} > ${STAMPFILE}; \
|
2001-03-10 13:51:40 +00:00
|
|
|
${ECHO_MSG} ">> CVS checkout successful." ;\
|
|
|
|
exit; \
|
|
|
|
fi ;\
|
|
|
|
if [ "X$${CVS_LOGIN}" = "Xyes" ]; then \
|
|
|
|
${CVS_CMD} -d $${CVS_SITE} logout < /dev/null; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
2001-12-21 23:29:13 +00:00
|
|
|
${ECHO_MSG} ">> Couldn't CVS checkout ${PORTNAME}." ;\
|
2001-03-10 13:51:40 +00:00
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
.endif
|
|
|
|
|
|
|
|
makesrctarball: fetch
|
|
|
|
@cd ${DISTDIR}; \
|
|
|
|
${ECHO_MSG} ">> Creating source tarball in ${DISTDIR}"; \
|
2001-12-21 23:29:13 +00:00
|
|
|
${ECHO_MSG} ">> \"${DISTNAME}.${CVS_DATE_}.tar.gz\"."; \
|
|
|
|
${TAR} cfz ${DISTNAME}.${CVS_DATE_}.tar.gz ${DISTNAME}
|
2001-03-10 13:51:40 +00:00
|
|
|
|
|
|
|
fetchsrctarball:
|
|
|
|
@cd ${DISTDIR}; \
|
2001-12-21 23:29:13 +00:00
|
|
|
file=${DISTNAME}.${CVS_DATE_}.tar.gz; \
|
2001-03-10 13:51:40 +00:00
|
|
|
if [ -e $$file ]; then \
|
|
|
|
exit; \
|
|
|
|
fi; \
|
|
|
|
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
|
|
|
|
for site in ${MASTER_SITES}; do \
|
|
|
|
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
|
|
|
|
if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} \
|
|
|
|
$${site}$${file}; then \
|
|
|
|
exit; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
${ECHO_MSG} ">> Couldn't fetch $$file."; \
|
|
|
|
${ECHO_MSG} ">> Please try to retrieve this file manually into"; \
|
|
|
|
${ECHO_MSG} ">> ${_DISTDIR} and try again."; \
|
|
|
|
exit 1
|
|
|
|
|
2001-12-21 23:29:13 +00:00
|
|
|
makedistfiles: fetch
|
|
|
|
cd ${DISTDIR} && find ${DISTNAME} \! -type d | \
|
|
|
|
egrep -v CVS\|.stamp > ${FILESDIR}/distfiles
|
|
|
|
|
2001-03-10 13:51:40 +00:00
|
|
|
do-extract:
|
|
|
|
@${MKDIR} ${WRKDIR}
|
2001-12-21 23:29:13 +00:00
|
|
|
@(cd ${DISTDIR}/${DISTNAME}/${PORTNAME} && \
|
|
|
|
find . ! -path *CVS* -print | \
|
2001-03-10 13:51:40 +00:00
|
|
|
cpio -pdmu ${WRKSRC} > /dev/null 2>&1)
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
@cd ${WRKSRC}; ${MAKE} ${ALL_TARGET}
|
|
|
|
|
|
|
|
do-install:
|
2001-12-21 23:29:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libh.a ${PREFIX}/lib/libh.a
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libh.so.0 ${PREFIX}/lib/libh.so.0
|
2001-03-10 13:51:40 +00:00
|
|
|
${LN} -sf ${PREFIX}/lib/libh.so.0 ${PREFIX}/lib/libh.so
|
2001-12-21 23:29:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libhui.a ${PREFIX}/lib/libhui.a
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libhui.so.0 ${PREFIX}/lib/libhui.so.0
|
2001-03-10 13:51:40 +00:00
|
|
|
${LN} -sf ${PREFIX}/lib/libhui.so.0 ${PREFIX}/lib/libhui.so
|
|
|
|
.for H_NAME in disk file database sysinstall
|
2001-12-21 23:29:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libh${H_NAME}.a ${PREFIX}/lib/libh${H_NAME}.a
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libh${H_NAME}.so.0 ${PREFIX}/lib/libh${H_NAME}.so.0
|
2001-03-10 13:51:40 +00:00
|
|
|
${LN} -sf ${PREFIX}/lib/libh${H_NAME}.so.0 ${PREFIX}/lib/libh${H_NAME}.so
|
|
|
|
.endfor
|
|
|
|
.for T_NAME in tclhui tcl tclfile tcldisk tclsysinstall
|
2001-12-21 23:29:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libh${T_NAME}.a ${PREFIX}/lib/libh${T_NAME}.a
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/compile/${UITYPE}/libh${T_NAME}.so.0 ${PREFIX}/lib/libh${T_NAME}.so.0
|
2001-03-10 13:51:40 +00:00
|
|
|
${LN} -sf ${PREFIX}/lib/libh${T_NAME}.so.0 ${PREFIX}/lib/libh${T_NAME}.so
|
|
|
|
.endfor
|
2001-12-21 23:29:13 +00:00
|
|
|
|
2001-03-10 13:51:40 +00:00
|
|
|
${MKDIR} ${PREFIX}/share/libh
|
2001-12-21 23:29:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/release/*.tcl ${PREFIX}/share/libh
|
|
|
|
|
|
|
|
.for DIR in diskedit scripts pkgtools
|
|
|
|
${MKDIR} ${PREFIX}/share/libh/${DIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/release/${DIR}/*.tcl \
|
|
|
|
${PREFIX}/share/libh/${DIR}
|
2001-03-10 13:51:40 +00:00
|
|
|
.endfor
|
2001-12-21 23:29:13 +00:00
|
|
|
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/compile/${UITYPE}/tclh.static ${PREFIX}/bin/tclh
|
2001-03-10 13:51:40 +00:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|