File: 124-integrate-patchy-bootstrap.dpatch

package info (click to toggle)
cernlib 20061220%2Bdfsg3-4.4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,872 kB
  • sloc: sh: 9,517; makefile: 187
file content (67 lines) | stat: -rwxr-xr-x 2,290 bytes parent folder | download | duplicates (2)
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
#! /bin/sh /usr/share/dpatch/dpatch-run
## 124-integrate-patchy-bootstrap.dpatch by Kevin B. McCarty <kmccarty@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Write a stub Imakefile for the "p5boot" directory so it can easily
## DP: be integrated into the build.

@DPATCH@
diff -urNad cernlib-2006.dfsg.2~/src/Imakefile cernlib-2006.dfsg.2/src/Imakefile
--- cernlib-2006.dfsg.2~/src/Imakefile	2008-02-26 14:39:40.000000000 -0800
+++ cernlib-2006.dfsg.2/src/Imakefile	2008-02-26 14:41:31.000000000 -0800
@@ -7,7 +7,7 @@
 SUBDIRS= $(LIBDIRS) patchy cfortran
 
 #ifdef CERNLIB_UNIX
-SUBDIRS:= $(SUBDIRS) scripts mgr
+SUBDIRS:= $(SUBDIRS) p5boot scripts mgr
 #endif
 
 InstallLibSubdirs($(LIBDIRS))
diff -urNad cernlib-2006.dfsg.2~/src/p5boot/Imakefile cernlib-2006.dfsg.2/src/p5boot/Imakefile
--- cernlib-2006.dfsg.2~/src/p5boot/Imakefile	1969-12-31 16:00:00.000000000 -0800
+++ cernlib-2006.dfsg.2/src/p5boot/Imakefile	2008-02-26 14:39:46.000000000 -0800
@@ -0,0 +1,7 @@
+install.bin: $(CERN_ROOT)/bin/ypatchy
+
+$(CERN_ROOT)/bin/ypatchy: $(CVSCOSRC)/p5boot/p5boot.sh
+	chmod a+x $<
+	FCOMP="$(FC) $(FCFLAGS) -no-pie" $<
+
+.PHONY: install.bin
diff -urNad cernlib-2006.dfsg.2~/src/p5boot/p5boot.sh cernlib-2006.dfsg.2/src/p5boot/p5boot.sh
--- cernlib-2006.dfsg.2~/src/p5boot/p5boot.sh	2006-12-07 06:17:53.000000000 -0800
+++ cernlib-2006.dfsg.2/src/p5boot/p5boot.sh	2008-02-26 14:39:46.000000000 -0800
@@ -1,20 +1,22 @@
-#!/bin/sh
+#!/bin/sh -e
 
-mkdir -p $CERN_ROOT/build/p5boot
-cd $CERN_ROOT/build/p5boot
-cp -p -r $CERN_ROOT/src/p5boot/* .
+mkdir -p "$CERN_ROOT"/build/p5boot
+cd "$CERN_ROOT"/build/p5boot
+cp -p -r -f "$CERN_ROOT"/src/p5boot/* .
 
 AR="ar cr"
 
-cd $CERN_ROOT/build/p5boot/p5lib
+cd "$CERN_ROOT"/build/p5boot/p5lib
 $FCOMP -c *.f
+# This file contains a "main" program which we don't want in the library:
+rm -f nsynopt.o
 $AR ../p5lib.a *.o
 
-cd $CERN_ROOT/build/p5boot
+cd "$CERN_ROOT"/build/p5boot
 
-$FCOMP -o nypatchy nypatchy.f p5lib.a $CERN_ROOT/lib/libkernlib.a
+$FCOMP -o nypatchy nypatchy.f p5lib.a "$CERN_ROOT"/lib/libkernlib.a
 
-cd $CERN_ROOT/bin
-ln -s $CERN_ROOT/build/p5boot/nypatchy ypatchy
+cd "$CERN_ROOT"/bin
+ln -s "$CERN_ROOT"/build/p5boot/nypatchy ypatchy
 
-cd $CERN_ROOT/build
+cd "$CERN_ROOT"/build