gkoehler 2719af69f9 fix -fno-common, LP64_ARCHS, HFS+ without wrapper
misc/hfsplus is old code from 2002; failed to build with -fno-common;
assumed sizeof(long) == 4, which is wrong on LP64_ARCHS; failed when
the HFS+ has no HFS wrapper.  Thaison Nguyen reported that hpmount
always gave an error.

 - Simplify Makefile by setting AUTORECONF.
 - Fix LP64_ARCHS by changing UInt32 and like types from long to int.
   Change many "%ld" to "%d" in printf()s to match.
 - Apply a patch from Gentoo to fix -fno-common.
 - Fix HFS+ with no HFS wrapper by setting vol->maxblocks.
 - In src/copyout.c, fix passing &size to int *lenptr.

ok tb@
2021-02-20 03:46:48 +00:00

46 lines
956 B
Makefile

# $OpenBSD: Makefile,v 1.35 2021/02/20 03:46:48 gkoehler Exp $
COMMENT= hfsplus filesystem access tool
VERSION= 1.0.4
DISTNAME= hfsplus_${VERSION}
PKGNAME= hfsplus-${VERSION}
REVISION= 7
SHARED_LIBS= hfsp 0.0
CATEGORIES= misc
# GPL
PERMIT_PACKAGE= Yes
WANTLIB= c
MASTER_SITES= https://distfiles.sigtrap.nl/
EXTRACT_SUFX= .src.tar.bz2
USE_GMAKE= Yes
AUTOCONF_VERSION= 2.59
AUTOMAKE_VERSION= 1.9
AUTORECONF= ${MAKE_PROGRAM} -f Makefile.cvs all
CONFIGURE_STYLE= gnu autoreconf
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
CFLAGS="${CFLAGS} -fgnu89-inline"
WRKDIST= ${WRKDIR}/hfsplus-${VERSION}
DOC= bugs.html hfsp.html libhfsp.html
post-patch:
@cd ${WRKDIST} && ln -s ${LOCALBASE}/share/libtool/config/ltmain.sh .
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/hfsplus/
.for h in ${DOC}
${INSTALL_DATA} ${WRKSRC}/doc/${h} ${PREFIX}/share/doc/hfsplus/
.endfor
.include <bsd.port.mk>