1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-15 03:14:23 +00:00
freebsd-ports/multimedia/subtitleripper/Makefile
Tobias Kortkamp 80365401d0 graphics/netpbm: Update to 10.80.00
- This moves netpbm to the advanced release series, which brings the
  port closer to what is available on OpenBSD, Fedora, Arch Linux,
  openSUSE, etc. and will let us get rid of patches for supporting
  newer libpng versions.
- The advanced release series is only available via an SVN checkout.
  Add two maintenance targets netpbm-version-check and netpbm-fetch
  to make fetching them easier.  To generate release tarballs the sources
  are then tagged and committed to https://github.com/t6/netpbm
- Add STATIC option for linking all programs statically to allow running them
  in small chroots
- Add option to disable adding a Perl run dependency.  Only a fraction
  of all programs need it.  Some are compatibility shims for newer
  programs which should be used instead.  The following programs require
  Perl: pamfixtrunc pbmtox10bm pgmcrater pnmflip pnmquant pnmquantall ppmfade
  ppmquant ppmrainbow ppmshadow
- Disable building svgtopam by default.  It's the only program that
  requires libxml2 and is obsolete according to the author.
- Install manpages by default
- Allow running of the test suite via `make test`
- Headers have been moved to ${LOCALBASE}/include/netpbm.  Fix ports
  that expect them to be in ${LOCALBASE}/include

Changes:	https://raw.githubusercontent.com/t6/netpbm/v10.80.00/doc/HISTORY
PR:		219982
Reviewed by:	mat
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D11157
2017-10-06 11:18:35 +00:00

71 lines
1.9 KiB
Makefile

# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
# $FreeBSD$
PORTNAME= subtitleripper
DISTVERSION= 0.3-4
PORTREVISION= 10
CATEGORIES= multimedia
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-0.3-4
MAINTAINER= multimedia@FreeBSD.org
COMMENT= Convert DVD subtitles into text format (subrip srt) or VobSub format
LIB_DEPENDS= libnetpbm.so:graphics/netpbm \
libpng.so:graphics/png
RUN_DEPENDS= gocr:graphics/gocr \
xv:graphics/xv \
transcode:multimedia/transcode
USES= gmake tar:tgz
CFLAGS+= -D_WITH_GETLINE=1 -DHAVE_GETLINE=1 \
-I${LOCALBASE}/include/netpbm
WRKSRC= ${WRKDIR}/${PORTNAME}
DOC_FILES= \
ChangeLog \
README \
README.gocr \
README.srttool \
README.subtitle2pgm \
README.vobsub
EXAMPLES_FILES= \
gocrfilter_en.sed \
gocrfilter_fr.sed \
gocrfilter_nl.sed \
gocrfilter_none.sed
PROGRAM_FILES= \
srttool \
subtitle2pgm \
subtitle2vobsub \
vobsub2pgm
SCRIPT_FILES= \
pgm2txt
OPTIONS_DEFINE= DOCS EXAMPLES
post-patch:
@${REINPLACE_CMD} -E \
-e 's|^(CC[[:space:]]*=).*$$|\1${CC}|' \
-e 's|^(COPT[[:space:]]*=).*$$|\1${CFLAGS}|' \
-e 's|^(INCLUDES[[:space:]]*:=).*$$|\1 -I${LOCALBASE}/include|' \
-e 's|^(LIBS[[:space:]]*:=).*$$|\1 -lm -L${LOCALBASE}/lib|' \
-e 's|-lppm|-lnetpbm|' \
${BUILD_WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -E \
-e 's|^(DB_PATH[[:space:]]*=).*$$|\1\$${HOME}/.db/|' \
-e 's|^(IMAGE_VIWER[[:space:]]*=).*$$|\1${LOCALBASE}/bin/xv|' \
-e 's|^(PATH_TO_LANGUAGE_FILTER[[:space:]]*=).*$$|\1${EXAMPLESDIR}/|' \
-e 's|(gocr[[:space:]]+)|${LOCALBASE}/bin/\1|' \
${WRKSRC}/pgm2txt
do-install:
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}; ${INSTALL_DATA} ${DOC_FILES} ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}; ${INSTALL_SCRIPT} ${EXAMPLES_FILES} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}; ${INSTALL_PROGRAM} ${PROGRAM_FILES} ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC}; ${INSTALL_SCRIPT} ${SCRIPT_FILES} ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>