summaryrefslogtreecommitdiff
path: root/x11/lablgtk1/patches/patch-aa
blob: 3c63f510419acd81d71aa40f9dc292e0956b03f7 (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
63
64
65
66
67
68
69
70
71
72
$NetBSD: patch-aa,v 1.2 2009/07/06 22:35:22 joerg Exp $

--- src/Makefile.orig	2003-05-15 16:17:53.000000000 +0200
+++ src/Makefile
@@ -38,7 +38,7 @@ CFLAGS = -g $(GTKCFLAGS)
 MLLINK += -cclib -lcamlrund
 MLFLAGS = -g
 else
-CFLAGS = -O -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS)
+CFLAGS = -O -fPIC -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS)
 endif
 
 THFLAGS = -thread
@@ -137,32 +137,39 @@ testcc: lablgladecc lablgtktop
 	rm -f testcc.ml
 
 install:
-	if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi
-	cp $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) $(INSTALLDIR)
-	cp -p *.mli $(INSTALLDIR)
-	cp -p $(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) $(INSTALLDIR)
-	cp $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(INSTALLDIR)
-	cp $(CLIBS) $(INSTALLDIR)
-	cd $(INSTALLDIR) && $(RANLIB) $(CLIBS)
-	cp lablgtktop varcc $(INSTALLDIR)
-	if test -f lablgtktop_t; then cp lablgtktop_t $(INSTALLDIR); fi
-	cp -p *.h $(INSTALLDIR)
+	if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} ${INSTALLDIR}; fi
+	for F in $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) *.mli \
+		$(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) \
+		$(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(CLIBS) *.h; \
+	do \
+	    ${BSD_INSTALL_DATA} $$F ${INSTALLDIR}; \
+	done
+	${BSD_INSTALL_SCRIPT} lablgtktop $(INSTALLDIR)
+	${BSD_INSTALL_SCRIPT} varcc $(INSTALLDIR)
+	if test -f lablgtktop_t; then ${BSD_INSTALL_SCRIPT} lablgtktop_t $(INSTALLDIR); fi
 	if test -f lablgtk.cmxa; then $(MAKE) installopt; fi
+	${BSD_INSTALL_DATA_DIR} $(DLLDIR)
 	if test -f dlllablgtk.so; then \
-	   if test -d $(DLLDIR); then : ; else mkdir -p $(DLLDIR); fi; \
-	   cp $(CLIBS:lib%.a=dll%.so) $(DLLDIR) || \
-	   echo "Couldn't install dlls in default location"; \
+	   for F in $(CLIBS:lib%.a=dll%.so); \
+	   do \
+		${BSD_INSTALL_DATA} $$F $(DLLDIR); \
+	   done; \
 	fi
-	cp lablgtk $(BINDIR)
+	${BSD_INSTALL_SCRIPT} lablgtk $(BINDIR)
 	if test -f lablgladecc; then cp lablgladecc $(BINDIR); fi
 
 installopt:
-	cp $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) $(INSTALLDIR)
-	cd $(INSTALLDIR) && $(RANLIB) $(MLLIBS:.cma=.a)
-	cp $(ALLOBJS:.cmo=.cmx) $(INSTALLDIR)
-	cp $(INITOBJS:.cmo=.o) $(INSTALLDIR)
+	for F in $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) \
+		$(ALLOBJS:.cmo=.cmx) $(INITOBJS:.cmo=.o); \
+	do \
+	    ${BSD_INSTALL_DATA} $$F $(INSTALLDIR); \
+	done
 	if test -f gtkThread.cmx; then \
-	   cp $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o) $(INSTALLDIR); fi
+	    for F in $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o); \
+	    do \
+		${BSD_INSTALL_DATA} $$F $(INSTALLDIR); \
+	    done; \
+	fi
 
 liblablgtk.a: $(COBJS)
 	$(LIBRARIAN) -o lablgtk $(COBJS) $(GTKLIBS)