5be0dc07b2
This is need for the upcoming work on cross building the ports tree
53 lines
1.6 KiB
Text
53 lines
1.6 KiB
Text
# $FreeBSD$
|
|
|
|
PORTNAME= xdev
|
|
PORTVERSION= 10.0
|
|
PKGNAMEPREFIX= ${X_BASE}-
|
|
|
|
DISTFILES= src.txz
|
|
DIST_SUBDIR= freebsd/${PORTVERSION}
|
|
|
|
CATEGORIES= devel
|
|
MASTER_SITES= FREEBSD_ORG/releases/amd64/${PORTVERSION}-RELEASE/
|
|
|
|
COMMENT= FreeBSD ${PORTVERSION} base libraries and headers for ${X_TARGET_ARCH}
|
|
|
|
LICENSE= BSD2CLAUSE
|
|
|
|
X_BASE= ${X_TARGET_ARCH}-freebsd${PORTVERSION}
|
|
WRKSRC= ${WRKDIR}/usr/src
|
|
SETENV= env -i
|
|
MAKE_ENV+= WITHOUT_PROFILE=yes __MAKE_CONF=/dev/null SRCCONF=/dev/null \
|
|
NO_FSCHG=yes \
|
|
XDEV=${X_TARGET} XDEV_ARCH=${X_TARGET_ARCH} \
|
|
XDTP=${PREFIX}/${X_BASE} \
|
|
MAKEOBJDIRPREFIX=${WRKDIR}/obj DESTDIR=${WRKDIR}/tmp
|
|
ALL_TARGET= xdev
|
|
|
|
.if !defined(WITH_DEBUG)
|
|
X_STRIP_CMD= ${WRKDIR}/tmp/${PREFIX}/${X_BASE}/usr/bin/strip
|
|
.else
|
|
X_STRIP_CMD= ${TRUE}
|
|
.endif
|
|
|
|
do-install:
|
|
@cd ${WRKDIR}/tmp; ${PAX} -rw . ${STAGEDIR}
|
|
@${FIND} ${STAGEDIR}${PREFIX}/${X_BASE} -type d -empty -delete
|
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/${X_BASE}/usr/bin/* 2>/dev/null
|
|
@${FIND} ${STAGEDIR}${PREFIX}/${X_BASE}/usr/lib -type f -name "*.so*" -exec ${X_STRIP_CMD} {} \; 2>/dev/null
|
|
@${FIND} ${STAGEDIR}${PREFIX}/${X_BASE}/lib -type f -exec ${X_STRIP_CMD} {} \; 2>/dev/null
|
|
#Fix symlinks
|
|
@for l in `${FIND} ${STAGEDIR}${PREFIX}/${X_BASE} -type l -print`; do \
|
|
d=`readlink $$l` ; \
|
|
case $$d in \
|
|
${WRKDIR}/tmp/*) ${LN} -sf $${d#${WRKDIR}/tmp} $$l ;; \
|
|
/*) ${LN} -sf ${PREFIX}/${X_BASE}$${d} $$l ;; \
|
|
esac ; \
|
|
done
|
|
@cd ${STAGEDIR}${PREFIX}/${X_BASE}/usr/bin; \
|
|
for i in *; do \
|
|
${LN} -sf ../${X_BASE}/usr/bin/$$i \
|
|
${STAGEDIR}${PREFIX}/bin/${X_BASE}-$$i ; \
|
|
done
|
|
@${RM} -rf ${STAGEDIR}/usr/usr
|
|
|