diff --git a/multimedia/subtitleripper/Makefile b/multimedia/subtitleripper/Makefile new file mode 100644 index 00000000000..8bf9c21c974 --- /dev/null +++ b/multimedia/subtitleripper/Makefile @@ -0,0 +1,36 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2007/07/29 17:07:49 ajacoutot Exp $ + +COMMENT= subtitle ripper, used with transcode + +DISTNAME= subtitleripper-0.3-4 +PKGNAME= subtitleripper-0.3.4 +EXTRACT_SUFX= .tgz +CATEGORIES= multimedia + +HOMEPAGE= http://subtitleripper.sourceforge.net/ + +MAINTAINER= Jeremy Evans + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=subtitleripper/} + +WANTLIB= c m z + +USE_GMAKE= Yes +LIB_DEPENDS= png.>=5::graphics/png \ + netpbm.>=1::graphics/netpbm +RUN_DEPENDS= ::multimedia/transcode + +WRKDIST= ${WRKDIR}/subtitleripper +NO_REGRESS= Yes + +pre-configure: + @perl -pi -e 's,!!LOCALBASE!!,${LOCALBASE},g' \ + ${WRKSRC}/Makefile + +.include diff --git a/multimedia/subtitleripper/distinfo b/multimedia/subtitleripper/distinfo new file mode 100644 index 00000000000..f0b057bfceb --- /dev/null +++ b/multimedia/subtitleripper/distinfo @@ -0,0 +1,5 @@ +MD5 (subtitleripper-0.3-4.tgz) = wL1JqI9mfGjEQwrSW77VEA== +RMD160 (subtitleripper-0.3-4.tgz) = FBNVlgdzqy3+N4JSKFgnPRl895c= +SHA1 (subtitleripper-0.3-4.tgz) = 2T/zV43V9yLI9O8WvAkD7sV4Gg0= +SHA256 (subtitleripper-0.3-4.tgz) = ivbC6+VTYZAIcccx6hCYsaA++nI80p7h1HFDW9IfOsQ= +SIZE (subtitleripper-0.3-4.tgz) = 47299 diff --git a/multimedia/subtitleripper/patches/patch-Makefile b/multimedia/subtitleripper/patches/patch-Makefile new file mode 100644 index 00000000000..642d947d16e --- /dev/null +++ b/multimedia/subtitleripper/patches/patch-Makefile @@ -0,0 +1,79 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2007/07/29 17:07:49 ajacoutot Exp $ +--- Makefile.orig Mon Dec 8 10:28:02 2003 ++++ Makefile Sun Jul 29 19:04:51 2007 +@@ -4,12 +4,12 @@ + + # use always: + DEFINES := +-LIBS := -lm +-INCLUDES := ++LIBS := -lm -L!!LOCALBASE!!/lib ++INCLUDES := -I!!LOCALBASE!!/include -I!!LOCALBASE!!/include/libpng + + ### enable ppm support ### + DEFINES += -D_HAVE_LIB_PPM_ +-LIBS += -lppm ++LIBS += -lnetpbm + + ### enable PNG support ### + DEFINES += -D_HAVE_PNG_ +@@ -19,11 +19,10 @@ LIBS += -lpng + DEFINES += -D_HAVE_ZLIB_ + LIBS += -lz + +-CC = gcc + WARN = -Wall -Wstrict-prototypes +-COPT = -g -O2 ++COPT = -g -O2 + +-CFLAGS = $(COPT) $(WARN) $(DEFINES) $(INCLUDES) ++CFLAGS += $(WARN) $(DEFINES) $(INCLUDES) + + # list of all files that are part of the package + PACKAGE_FILES = Makefile \ +@@ -50,14 +49,20 @@ RELEASE=4 + # Main targets + + TARGETS = subtitle2pgm srttool subtitle2vobsub vobsub2pgm ++DOCS = README* gocrfilter_* pgm2txt + + all: $(TARGETS) + ++install: all ++ $(BSD_INSTALL_PROGRAM) $(TARGETS) $(PREFIX)/bin ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/doc/$(PACKAGE) ++ $(BSD_INSTALL_DATA) $(DOCS) $(PREFIX)/share/doc/$(PACKAGE) ++ + # Generic Rules + + %.o:%.c + @echo Compiling $< +- @$(CC) -c $(CFLAGS) $< ++ $(CC) -c $(CFLAGS) $< + + # Dependencies + subtitle2pgm.o: subtitle2pgm.c spudec.h subtitle2pgm.h +@@ -70,19 +75,19 @@ vobsub2pgm.o: vobsub2pgm.c vobsub.h spudec.h + # Target + subtitle2pgm: subtitle2pgm.o spudec.o + @echo "Linking $@" +- @$(CC) $(LIBS) $^ -o $@ ++ $(CC) $(LIBS) $^ -o $@ + + subtitle2vobsub: subtitle2vobsub.o vobsub.o + @echo "Linking $@" +- @$(CC) $(LIBS) $^ -o $@ ++ $(CC) $(LIBS) $^ -o $@ + + srttool: srttool.o + @echo "Linking $@" +- @$(CC) $(LIBS) -g $^ -o $@ ++ $(CC) $(LIBS) -g $^ -o $@ + + vobsub2pgm: vobsub2pgm.o vobsub.o spudec.o + @echo "Linking $@" +- @$(CC) $(LIBS) -g $^ -o $@ ++ $(CC) $(LIBS) -g $^ -o $@ + + .PHONY: clean dist rpm + clean: diff --git a/multimedia/subtitleripper/pkg/DESCR b/multimedia/subtitleripper/pkg/DESCR new file mode 100644 index 00000000000..2e3febd7a73 --- /dev/null +++ b/multimedia/subtitleripper/pkg/DESCR @@ -0,0 +1,4 @@ +If you want to convert DVD subtitles into text format (e.g. subrip +format) or VobSub format, this program could be useful for you. However, +it is only one tiny tool that you need in the process of producing srt +files. diff --git a/multimedia/subtitleripper/pkg/PLIST b/multimedia/subtitleripper/pkg/PLIST new file mode 100644 index 00000000000..f658a38555f --- /dev/null +++ b/multimedia/subtitleripper/pkg/PLIST @@ -0,0 +1,17 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2007/07/29 17:07:49 ajacoutot Exp $ +@conflict subrip-* +bin/srttool +bin/subtitle2pgm +bin/subtitle2vobsub +bin/vobsub2pgm +share/doc/subtitleripper/ +share/doc/subtitleripper/README +share/doc/subtitleripper/README.gocr +share/doc/subtitleripper/README.srttool +share/doc/subtitleripper/README.subtitle2pgm +share/doc/subtitleripper/README.vobsub +share/doc/subtitleripper/gocrfilter_en.sed +share/doc/subtitleripper/gocrfilter_fr.sed +share/doc/subtitleripper/gocrfilter_nl.sed +share/doc/subtitleripper/gocrfilter_none.sed +share/doc/subtitleripper/pgm2txt