summaryrefslogtreecommitdiffstats
path: root/patches/01_remove-data-prerequisites.patch
blob: ff41e05186a9c8173d9aa9c7d3263b92d1b62550 (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
From: "P. J. McDermott" <pjm@nac.net>
Subject: Makefile: Remove data prerequisites

The tz makefile is shared between tzdata and tzcode, and the tzcode program
targets depend on files only packed into tzdata.

Before:

    oh-autobuild
    make[1]: Entering directory `/home/pj/distro/pkg/tzcode/tmp/src'
    sed \
    			-e 's|#!/bin/bash|#!/bin/bash|g' \
    			-e 's|AWK=[^}]*|AWK=awk|g' \
    			-e 's|\(PKGVERSION\)=.*|\1='\''(tzcode) '\''|' \
    			-e 's|\(REPORT_BUGS_TO\)=.*|\1=tz@iana.org|' \
    			-e 's|TZDIR=[^}]*|TZDIR=/usr/local/etc/zoneinfo|' \
    			-e 's|\(TZVERSION\)=.*|\1=2013g|' \
    			<tzselect.ksh >tzselect
    chmod +x tzselect
    (echo 'static char const PKGVERSION[]="(tzcode) ";' && \
    		 echo 'static char const TZVERSION[]="2013g";' && \
    		 echo 'static char const REPORT_BUGS_TO[]="tz@iana.org";') >version.h
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o zic.o zic.c
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o localtime.o localtime.c
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o asctime.o asctime.c
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o scheck.o scheck.c
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o ialloc.o ialloc.c
    make[1]: *** No rule to make target `yearistype.sh', needed by `yearistype'.  Stop.
    make[1]: Leaving directory `/home/pj/distro/pkg/tzcode/tmp/src'
    make: *** [build] Error 2

With yearistype prerequisite removed:

    oh-autobuild
    make[1]: Entering directory `/home/pj/distro/pkg/tzcode/tmp/src'
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\" -o zic   zic.o localtime.o asctime.o scheck.o ialloc.o 
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o zdump.o zdump.c
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\" -o zdump   zdump.o localtime.o ialloc.o asctime.c 
    cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o difftime.o difftime.c
    make[1]: *** No rule to make target `iso3166.tab', needed by `all'.  Stop.
    make[1]: Leaving directory `/home/pj/distro/pkg/tzcode/tmp/src'
    make: *** [build] Error 2

diff -Naur src.orig/Makefile src/Makefile
--- src.orig/Makefile	2013-10-01 00:10:49.000000000 -0400
+++ src/Makefile	2013-10-06 14:56:07.557822960 -0400
@@ -340,7 +340,7 @@
 
 SHELL=		/bin/sh
 
-all:		tzselect zic zdump $(LIBOBJS) $(TABDATA)
+all:		tzselect zic zdump $(LIBOBJS)
 
 ALL:		all date
 
@@ -381,7 +381,7 @@
 zdump:		$(TZDOBJS)
 		$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
 
-zic:		$(TZCOBJS) yearistype
+zic:		$(TZCOBJS)
 		$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
 
 yearistype:	yearistype.sh