mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
704080a7b5
Changes common to cdrtools and mkisofs: - Delete targets for mkisofs and friends when building cdrtools and vice versa to speed up the build of the respective port. - Respect CC already at the configure-stage. - Manually replace included copies of config.guess and config.sub with versions from ${PORTSDIR}/Templates. - Install relevant READMEs in DOCSDIR (unless NOPORTDOCS is set), some manual pages also reference these. - Add a workaround for what appears to be a problem with gmake and certain locales on -current. [1] Changes to cdrtools: - Adjust COMMENT, some tools in this package are for extracting CDs/CD-R[W]s. - Install scgcheck, a tool to check and validate the ABI of libscg. - Patch cdrecord to use ${PREFIX}/etc as the location of the global configuration file, rather than using /etc/default. The installed documentaion also gets patched accordingly and a PKGMESSAGE reflecting this change as required by the terms in cdrecord/defaults.c (PR 50835). - Install a sample configuration file for cdrecord, also install a configuration file if it doesn't already exist. - Patch manpages to better correspond to files and locations on FreeBSD. - Add a knob to optionally build and install rscsi, a tool that allows using SCSI-devices over the network. The required rscsi user gets added automatically and templates for the configuration file also get installed. PKGINSTALL points to for further information on how to configure remote access to SCSI-devices. Note that the stock rscsi of cdrtools 2.00.3 has a small security issue, the fix from the cdrtools alpha version has been added to the port. - Remove BSD_SCSI_SENSE_BUG from COPTX (CFLAGS) to libscg (see revision 1.48 of sysutils/cdrtools-devel/Makefile for a more detailed description). - Make the direct ATAPI transport (cooked_ioctl interface) of cdda2wav (e.g. when used via `cdda2wav -D /dev/acd0`) work on FreeBSD after ata(4) was GEOM'ifed and the CDIOCREADAUDIO ioctl removed. - Properly initialise the verbosity level of cdda2wav when the cooked_ioctl interface is used so it's disabled by default. - Remove unnecessary patch-ai, this patch for supporting Plasmon RF 4100 originated in the FreeBSD port of cdrtools but the relevant parts were incorporated in cdrtools-1.10a14. - Disable the use of mlockall(2) on all version of FreeBSD (see PR 62930 for a description of the problem). Changes to mkisofs: - Add MLINKS for devdump.8, isodump.8 and isovfy.8 to isoinfo.8. - Install isodebug, a simple tool to display the creation date and the commandline options used to create a certain ISO-image with mkisofs. - Remove apple_driver.8, this tool doesn't get installed. - Unbreak mkhybrid.8 by replacing it with a MLINKS to mkisofs.8. - Remove patch-bb, its purpose is unclear and there's no indication in the CVS history why it was added. Requested by: pav [1] Submitted by: marius (maintainer) Changes to UPDATING: - add a note about the new location of the global configuration of cdrecord.
173 lines
5.6 KiB
Makefile
173 lines
5.6 KiB
Makefile
# New ports collection makefile for: cdrtools
|
|
# Date created: Wed Jul 25 23:30:19 CEST 2001
|
|
# Whom: Dirk Froemberg <dirk@FreeBSD.org>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME?= cdrtools
|
|
PORTVERSION?= 2.0.3
|
|
PORTREVISION?= 2
|
|
CATEGORIES?= sysutils audio
|
|
MASTER_SITES= ftp://ftp.berlios.de/pub/cdrecord/ \
|
|
ftp://ftp.cs.tu-berlin.de/pub/misc/cdrecord/ \
|
|
ftp://ftp.gwdg.de/pub/linux/misc/cdrecord/
|
|
DISTNAME= cdrtools-2.00.3
|
|
|
|
MAINTAINER?= marius@FreeBSD.org
|
|
COMMENT?= Cdrecord and other programs to extract and record CDs/CD-R[W]s
|
|
|
|
CONFLICTS?= cdrtools-devel-*
|
|
|
|
.if defined(MKISOFS)
|
|
MAN8= isoinfo.8 mkisofs.8
|
|
MLINKS= isoinfo.8 devdump.8 isoinfo.8 isodump.8 isoinfo.8 isovfy.8 \
|
|
mkisofs.8 mkhybrid.8
|
|
DOCS= README README.compression README.eltorito README.graft_dirs \
|
|
README.hfs_boot README.hfs_magic README.hide README.joliet \
|
|
README.macosx README.mkhybrid README.prep_boot README.rootinfo \
|
|
README.session README.sort README.sparcboot
|
|
.else
|
|
MAN1= cdda2wav.1 cdrecord.1 readcd.1 scgcheck.1
|
|
DOCS= README README.ATAPI README.DiskT@2 README.FreeBSD README.WORM \
|
|
README.audio README.cdplus README.cdrw README.cdtext \
|
|
README.copy README.mkisofs README.multi README.raw \
|
|
README.rscsi README.sony README.verify
|
|
CDDA2WAVDOCS= FAQ Frontends HOWTOUSE OtherProgs README THANKS TODO
|
|
.endif
|
|
|
|
USE_GMAKE= yes
|
|
USE_REINPLACE= yes
|
|
MAKE_ENV= CCOM=${CC} LANG=C
|
|
#CFLAGS+= -DSOURCE_MODIFIED
|
|
|
|
.if defined(MKISOFS)
|
|
DOCSSRC= ${WRKSRC}/${PORTNAME}
|
|
PKGMESSAGE= ""
|
|
.else
|
|
DOCSSRC= ${WRKSRC}
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
.if defined(WITH_RSCSI)
|
|
PKGINSTALL= ${PKGDIR}/pkg-install.rscsi
|
|
PLIST_SUB= RSCSI=""
|
|
PKGNAMESUFFIX= -rscsi
|
|
.else
|
|
PLIST_SUB= RSCSI="@comment "
|
|
.endif
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
pre-everything::
|
|
.if !defined(MKISOFS) && !defined(WITH_RSCSI)
|
|
@${ECHO_MSG} ""
|
|
@${ECHO_MSG} "You may use the following build option(s):"
|
|
@${ECHO_MSG} ""
|
|
@${ECHO_MSG} "WITH_RSCSI=yes builds with the rscsi daemon which provides access to"
|
|
@${ECHO_MSG} " local SCSI-devices over the network (the client-side"
|
|
@${ECHO_MSG} " in cdda2wav, cdrecord, etc. is built unconditionally)."
|
|
@${ECHO_MSG} " BEWARE: The rscsi binary gets installed suid root as"
|
|
@${ECHO_MSG} " this is the preferred method to set it up."
|
|
@${ECHO_MSG} ""
|
|
.endif
|
|
|
|
post-extract:
|
|
.for i in config.guess config.sub
|
|
@${CP} ${PORTSDIR}/Templates/${i} ${WRKSRC}/conf
|
|
@${CP} ${PORTSDIR}/Templates/${i} ${WRKSRC}/cdda2wav
|
|
.endfor
|
|
.if ${MACHINE_ARCH} != "i386" || ${CC} != "cc"
|
|
@${LN} -sf ${WRKSRC}/RULES/i386-freebsd-cc.rul \
|
|
${WRKSRC}/RULES/${MACHINE_ARCH}-freebsd-${CC}.rul
|
|
.endif
|
|
|
|
post-patch:
|
|
.if defined(MKISOFS)
|
|
.for i in 45libdeflt 45libedc 45libparanoia 55cdda2wav 55cdrecord 55readcd \
|
|
55rscsi 55scgcheck
|
|
@${RM} ${WRKSRC}/TARGETS/${i}
|
|
.endfor
|
|
.else
|
|
.for i in 45libfile 45libhfs_iso 45libunls 55mkisofs 55mkisofs!@!diag
|
|
@${RM} ${WRKSRC}/TARGETS/${i}
|
|
.endfor
|
|
.if !defined(WITH_RSCSI)
|
|
@${RM} ${WRKSRC}/TARGETS/55rscsi
|
|
.endif
|
|
.for i in README.rscsi include/deflts.h cdda2wav/cdda2wav.1 \
|
|
cdrecord/cdrecord.1 cdrecord/cdrecord.dfl cdrecord/defaults.c \
|
|
librscg/scsi-remote.c readcd/readcd.1 rscsi/rscsi.c rscsi/rscsi.dfl \
|
|
scgcheck/scgcheck.1
|
|
@${REINPLACE_CMD} -e 's|\/opt\/schily|${PREFIX}|g; \
|
|
s|\/usr\/local|${PREFIX}|g; s|\/etc\/default|${PREFIX}\/etc|g; \
|
|
s|\/var\/adm\/messages|\/var\/run\/dmesg.boot|g' ${WRKSRC}/${i}
|
|
.endfor
|
|
# @${REINPLACE_CMD} -E -e \
|
|
# 's|#define.+INSERT_YOUR_EMAIL_ADDRESS_HERE|& "${MAINTAINER}"|' \
|
|
# ${WRKSRC}/cdrecord/cdrecord.c
|
|
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message > \
|
|
${WRKDIR}/pkg-message
|
|
.endif
|
|
|
|
do-install:
|
|
.if defined(MKISOFS)
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/OBJ/${ARCH}-freebsd-cc/mkisofs \
|
|
${PREFIX}/bin
|
|
@${LN} -sf mkisofs ${PREFIX}/bin/mkhybrid
|
|
.for i in devdump isodebug isodump isoinfo isovfy
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/diag/OBJ/${ARCH}-freebsd-cc/${i} \
|
|
${PREFIX}/bin
|
|
.endfor
|
|
@${INSTALL_MAN} ${WRKSRC}/mkisofs/mkisofs.8 ${PREFIX}/man/man8
|
|
@${INSTALL_MAN} ${WRKSRC}/mkisofs/diag/isoinfo.8 ${PREFIX}/man/man8
|
|
.else
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/cdda2wav/OBJ/${ARCH}-freebsd-cc/cdda2wav \
|
|
${PREFIX}/bin
|
|
@${LN} -sf cdda2wav ${PREFIX}/bin/list_audio_tracks
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/cdrecord/OBJ/${ARCH}-freebsd-cc/cdrecord \
|
|
${PREFIX}/bin
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/readcd/OBJ/${ARCH}-freebsd-cc/readcd \
|
|
${PREFIX}/bin
|
|
.if defined(WITH_RSCSI)
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/rscsi/OBJ/${ARCH}-freebsd-cc/rscsi \
|
|
${PREFIX}/sbin
|
|
@${CHMOD} u+s ${PREFIX}/sbin/rscsi
|
|
.endif
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/scgcheck/OBJ/${ARCH}-freebsd-cc/scgcheck \
|
|
${PREFIX}/bin
|
|
@${INSTALL_MAN} ${WRKSRC}/cdda2wav/cdda2wav.1 ${PREFIX}/man/man1
|
|
@${INSTALL_MAN} ${WRKSRC}/cdrecord/cdrecord.1 ${PREFIX}/man/man1
|
|
@${INSTALL_MAN} ${WRKSRC}/readcd/readcd.1 ${PREFIX}/man/man1
|
|
@${INSTALL_MAN} ${WRKSRC}/scgcheck/scgcheck.1 ${PREFIX}/man/man1
|
|
@${INSTALL_DATA} ${WRKSRC}/cdrecord/cdrecord.dfl \
|
|
${PREFIX}/etc/cdrecord.sample
|
|
.if !exists(${PREFIX}/etc/cdrecord)
|
|
@${INSTALL_DATA} ${WRKSRC}/cdrecord/cdrecord.dfl ${PREFIX}/etc/cdrecord
|
|
.endif
|
|
.if defined(WITH_RSCSI)
|
|
@${INSTALL_DATA} ${WRKSRC}/rscsi/rscsi.dfl ${PREFIX}/etc/rscsi.sample
|
|
.if !exists(${PREFIX}/etc/rscsi)
|
|
@${INSTALL_DATA} ${WRKSRC}/rscsi/rscsi.dfl ${PREFIX}/etc/rscsi
|
|
.endif
|
|
.endif
|
|
.endif
|
|
.if !defined(NOPORTDOCS)
|
|
@${MKDIR} ${DOCSDIR}
|
|
.for i in ${DOCS}
|
|
@${INSTALL_DATA} ${DOCSSRC}/${i} ${DOCSDIR}
|
|
.endfor
|
|
.if !defined(MKISOFS)
|
|
@${MKDIR} ${DOCSDIR}/cdda2wav
|
|
.for i in ${CDDA2WAVDOCS}
|
|
@${INSTALL_DATA} ${DOCSSRC}/cdda2wav/${i} ${DOCSDIR}/cdda2wav
|
|
.endfor
|
|
.endif
|
|
.endif
|
|
|
|
post-install:
|
|
-@if [ -f ${PKGINSTALL} ]; then ${SETENV} PKG_PREFIX=${PREFIX} \
|
|
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL; fi
|
|
@if [ -f ${WRKDIR}/pkg-message ]; then ${CAT} ${WRKDIR}/pkg-message; fi
|
|
|
|
.include <bsd.port.post.mk>
|