1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Bump PORTREVISION

- Add license (GPLv2)
- Use the new format for LIB_DEPENDS
- Comply with OptionsNG
- Use PLIST_FILES instead of pkg-plist
- Support STAGEDIR
- Simplify DOCS installation handling and add Option
- Add OPTIONS_SINGLE=VIDEO-FORMAT and NTSC, PAL SINGLE Options,
  and REINPLACE
- Use files/makefile instead of files/patch-makefile and REINPLACE
- Add REINPLACE instead of simple patch

PR:		ports/179154
Submitted by:	nemysis (self)
This commit is contained in:
Rusmir Dusko 2014-03-26 17:15:26 +00:00
parent e0b52ac4eb
commit 9fa06126e0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349268
5 changed files with 59 additions and 74 deletions

View File

@ -3,45 +3,55 @@
PORTNAME= dv2jpg
PORTVERSION= 1.1
PORTREVISION= 10
PORTREVISION= 11
CATEGORIES= multimedia
MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= Convert Type-2 DV codec-encoded AVI streams to mjpeg-encoded AVI
LIB_DEPENDS= dv.4:${PORTSDIR}/multimedia/libdv
LICENSE= GPLv2
LIB_DEPENDS= libdv.so:${PORTSDIR}/multimedia/libdv
USE_GNOME= gdkpixbuf
MAKEFILE= makefile
.if defined(WITH_PAL_VIDEO)
VID_FORMAT= PAL
.else
VID_FORMAT= NTSC
.endif
PLIST_FILES= bin/avijoin bin/dv2jpg
NO_STAGE= yes
pre-everything::
@${ECHO_MSG} "===> The default video format is NTSC"
@${ECHO_MSG} "===> You can change this to PAL by defining"
@${ECHO_MSG} "===> WITH_PAL_VIDEO"
PORTDOCS= README.avilib README.dv2jpg.html
OPTIONS_DEFINE= DOCS
OPTIONS_SINGLE= VIDEO-FORMAT
OPTIONS_SINGLE_VIDEO-FORMAT= NTSC PAL
OPTIONS_DEFAULT= NTSC
VIDEO-FORMAT_DESC= Use default video format
NTSC_DESC= Default video format NTSC
PAL_DESC= Default video format PAL
.include <bsd.port.options.mk>
post-extract:
${INSTALL_DATA} ${FILESDIR}/makefile ${WRKSRC}
${RM} ${WRKSRC}/avijoin ${WRKSRC}/dv2jpg ${WRKSRC}/*.o
post-patch:
@${REINPLACE_CMD} -e 's|%%VID_FORMAT%%|${VID_FORMAT}|' \
${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e 's|/opt/vidpb/lib/avilib.h|avilib.h|' \
${WRKSRC}/avijoin.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/avijoin ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/dv2jpg ${PREFIX}/bin/
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for f in README.avilib README.dv2jpg.html
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/
.endfor
.if ${PORT_OPTIONS:MPAL}
@${REINPLACE_CMD} -e 's|VIDEO=NTSC|# VIDEO=NTSC|; \
s|# VIDEO=PAL|VIDEO=PAL|' \
${WRKSRC}/${MAKEFILE}
.endif
do-install:
.for f in avijoin dv2jpg
(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${f} ${STAGEDIR}${PREFIX}/bin/)
.endfor
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View File

@ -0,0 +1,27 @@
INC=`${GDK_PIXBUF_CONFIG} --cflags` -I${PREFIX}/include/libdv
LIBS=-ljpeg -lm -ldv `${GDK_PIXBUF_CONFIG} --libs` -L${LOCALBASE}/lib
# what type of video do you want?
VIDEO=NTSC
# VIDEO=PAL
all: dv2jpg avijoin
dv2jpg: dv2jpg.o avilib.o dvavilib.o
$(CC) $(CFLAGS) -o dv2jpg dv2jpg.o avilib.o dvavilib.o $(LIBS) $(LDFLAGS)
dv2jpg.o: dv2jpg.c
$(CC) $(CFLAGS) $(INC) -D$(VIDEO) -c dv2jpg.c
avilib.o: avilib.c
$(CC) $(CFLAGS) -c avilib.c
dvavilib.o: dvavilib.c
$(CC) $(CFLAGS) -c dvavilib.c
clean:
/bin/rm -f *.o dv2jpg core avijoin
avijoin: avijoin.c avilib.o
$(CC) $(CFLAGS) -o avijoin avijoin.c avilib.o $(LDFLAGS)

View File

@ -1,9 +0,0 @@
--- avijoin.c.orig Sun Jun 24 02:04:47 2001
+++ avijoin.c Sun Feb 16 01:24:49 2003
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include "/opt/vidpb/lib/avilib.h"
+#include "avilib.h"
#define MAX_FILES 255
#define OURBUFSIZ 4096000

View File

@ -1,38 +0,0 @@
--- makefile.orig Sat Jun 23 22:04:47 2001
+++ makefile Fri Sep 24 12:05:35 2004
@@ -1,27 +1,27 @@
-INC=-I/opt/gdk-pixbuf/lib -I/usr/include -I/usr/include/libdv
-LIBS=-ljpeg -lm -lgdk_pixbuf /usr/lib/libdv.a
+INC=`${GDK_PIXBUF_CONFIG} --cflags` -I${PREFIX}/include/libdv
+LIBS=-ljpeg -lm -ldv `${GDK_PIXBUF_CONFIG} --libs` -L${LOCALBASE}/lib
# what type of video do you want?
-VIDEO=NTSC
+VIDEO=%%VID_FORMAT%%
# VIDEO=PAL
all: dv2jpg avijoin
dv2jpg: dv2jpg.o avilib.o dvavilib.o
- gcc -o dv2jpg dv2jpg.o avilib.o dvavilib.o $(LIBS) `glib-config --libs` `gtk-config --libs`
+ $(CC) $(CFLAGS) -o dv2jpg dv2jpg.o avilib.o dvavilib.o $(LIBS) $(LDFLAGS)
dv2jpg.o: dv2jpg.c
- gcc -g $(INC) `glib-config --cflags` `gtk-config --cflags` -D$(VIDEO) -g -c dv2jpg.c
+ $(CC) $(CFLAGS) $(INC) -D$(VIDEO) -c dv2jpg.c
avilib.o: avilib.c
- gcc -g -c avilib.c
+ $(CC) $(CFLAGS) -c avilib.c
dvavilib.o: dvavilib.c
- gcc -g -c dvavilib.c
+ $(CC) $(CFLAGS) -c dvavilib.c
clean:
/bin/rm -f *.o dv2jpg core avijoin
avijoin: avijoin.c avilib.o
- gcc -g -o avijoin avijoin.c avilib.o
+ $(CC) $(CFLAGS) -o avijoin avijoin.c avilib.o $(LDFLAGS)

View File

@ -1,5 +0,0 @@
bin/avijoin
bin/dv2jpg
%%PORTDOCS%%%%DOCSDIR%%/README.avilib
%%PORTDOCS%%%%DOCSDIR%%/README.dv2jpg.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%