summaryrefslogtreecommitdiff
path: root/graphics/mpgtx/patches/patch-ab
blob: 5f3a29a17aa04ae67c90a8150f136f74a4e37fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
$NetBSD: patch-ab,v 1.1 2003/10/11 14:59:58 cube Exp $

--- configure.orig	2002-08-30 18:03:12.000000000 +0200
+++ configure
@@ -76,6 +76,7 @@ do 
 	 -stat | -static | --stat | --static) static="yes";;
 	 -par | -parachute | --par | --parachute) parachute="yes";;
 	 -prefix=* | --prefix=*) prefix=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+	 -manprefix=* | --manprefix=*) manprefix=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 	 -dist | dist | --distrib | -distrib) rm -f Makefile && cat << EOF >makefile && exit 0;;
 # Dummy Makefile, please run ./configure	 
 default:
@@ -134,7 +135,7 @@ done
 # gcc 3 does not seem to like -O3 with mpgtx very much 
 
 # next line is from Chris Danis
-gcc_major=`gcc --version | cut -b 1`
+gcc_major=`gcc -dumpversion | cut -b 1`
 
 if test $gcc_major = "3"; then
 	optimization_cflags="-O2";
@@ -243,7 +244,7 @@ cat << EOF >>$makefilename
 
 # Now onto the targets
 
-default: warn mpgtx
+all: warn mpgtx
 	@echo "----------------------------------------------------------------------"
 	@echo "Success building mpgtx. Now type \"make install\" to install it"
 	@echo "----------------------------------------------------------------------"	
@@ -293,21 +294,16 @@ clean :
 
 
 install: 
-	ln -sf mpgtx mpgjoin  
-	ln -sf mpgtx mpgsplit 
-	ln -sf mpgtx mpgcat   
-	ln -sf mpgtx mpginfo  
-	ln -sf mpgtx mpgdemux
-	ln -sf mpgtx tagmp3
-	install -d -m 755  \$(INSTALLDIR)
-	install -d -m 755  \$(MANDIR)
-	install -s -m 755 mpgtx \$(INSTALLDIR)
-	cp -\$(cpflags)f mpgdemux mpgjoin mpgcat mpginfo mpgsplit tagmp3 \$(INSTALLDIR)
-	install -m 644 man/mpgtx.1 man/tagmp3.1 \$(MANDIR) 
-	cd man ; make
-	cd ..
-	cp -\$(cpflags)f ./man/mpgdemux.1 ./man/mpgjoin.1 man/mpgsplit.1 man/mpgcat.1 man/mpginfo.1 \$(MANDIR)
-
+	\$(BSD_INSTALL_PROGRAM) mpgtx \$(INSTALLDIR)
+	for prog in mpgjoin mpgsplit mpgcat mpginfo mpgdemux tagmp3 ;	\\
+	do								\\
+	    ln -sf mpgtx \$(INSTALLDIR)/\$\$prog ;			\\
+	done ;
+	\$(BSD_INSTALL_MAN) man/mpgtx.1 man/tagmp3.1 \$(MANDIR)
+	for prog in mpgjoin mpgsplit mpgcat mpginfo mpgdemux ;		\\
+	do								\\
+	    ln -f \$(MANDIR)/mpgtx.1 \$(MANDIR)/\$\$prog.1 ;		\\
+	done ;
 
 uninstall:
 	rm -f   \$(INSTALLDIR)/mpgtx