/[gentoo-x86]/sys-fs/e2fsprogs/files/e2fsprogs-1.41.12-darwin-makefile.patch
Gentoo

Contents of /sys-fs/e2fsprogs/files/e2fsprogs-1.41.12-darwin-makefile.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Dec 5 12:51:13 2010 UTC (4 years ago) by grobian
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +21 -16 lines
Fix Darwin Makefile patch, it was obviously blindly ported to a newer version.  Re-add removed docs to patches.

(Portage version: 2.2.01.17304-prefix/cvs/Darwin powerpc)

1 On Darwin, create dylibs with a versioning scheme like Linux/ELF, not
2 like BSD/ELF.
3 This patch uses intentionally ELF_* vars to make it easier to diff
4 against the ELF Makefile.
5
6 http://sourceforge.net/tracker/index.php?func=detail&aid=2555389&group_id=2406&atid=302406
7
8 --- lib/Makefile.darwin-lib
9 +++ lib/Makefile.darwin-lib
10 @@ -1,14 +1,15 @@
11 #
12 -# This is a Makefile stub which handles the creation of Darwin BSD shared
13 -# libraries.
14 +# This is a Makefile stub which handles the creation of Darwin shared
15 +# libraries based on the ELF scheme.
16 #
17 # In order to use this stub, the following makefile variables must be defined.
18 -#
19 -# BSDLIB_VERSION = 1.0
20 -# BSDLIB_IMAGE = libce
21 -# BSDLIB_MYDIR = et
22 -# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
23 -#
24 +#
25 +# ELF_VERSION = 1.0
26 +# ELF_SO_VERSION = 1
27 +# ELF_IMAGE = libce
28 +# ELF_MYDIR = et
29 +# ELF_INSTALL_DIR = $(SHLIBDIR)
30 +# ELF_OTHER_LIBS = -lc
31
32 all:: image
33
34 @@ -16,36 +17,58 @@
35 $(E) " MKDIR pic"
36 $(Q) mkdir -p pic
37
38 -BSD_LIB = $(BSDLIB_IMAGE).$(BSDLIB_VERSION).dylib
39 -BSDLIB_PIC_FLAG = -fPIC
40 +ELF_LIB = $(ELF_IMAGE).$(ELF_VERSION).dylib
41 +ELF_SONAME = $(ELF_IMAGE).$(ELF_SO_VERSION).dylib
42
43 -image: $(BSD_LIB)
44 +image: $(ELF_LIB)
45
46 -$(BSD_LIB): $(OBJS)
47 - $(E) " GEN_BSD_SOLIB $(BSD_LIB)"
48 - $(Q) (cd pic; $(CC) -dynamiclib -compatibility_version 1.0 -current_version $(BSDLIB_VERSION) \
49 - -flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS))
50 - $(Q) $(MV) pic/$(BSD_LIB) .
51 - $(Q) $(RM) -f ../$(BSD_LIB)
52 +$(ELF_LIB): $(OBJS)
53 + $(E) " GEN_ELF_SOLIB $(ELF_LIB)"
54 + $(Q) (cd pic; $(CC) -dynamiclib -o $(ELF_LIB) $(LDFLAGS) \
55 + -Wl,-install_name,$(libdir)/$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS))
56 + $(Q) $(MV) pic/$(ELF_LIB) .
57 + $(Q) $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).dylib ../$(ELF_SONAME)
58 $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
59 - `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB))
60 - $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(BSD_LIB) $(BSDLIB_IMAGE).dylib)
61 -
62 -install-shlibs install:: $(BSD_LIB)
63 - $(E) " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
64 - $(Q) $(INSTALL_PROGRAM) $(BSD_LIB) \
65 - $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
66 - -$(Q) $(LDCONFIG)
67 + `echo $(my_dir) | sed -e 's;lib/;;'`/$(ELF_LIB) $(ELF_LIB))
68 + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_IMAGE).dylib)
69 + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_SONAME))
70 +
71 +installdirs-elf-lib::
72 + $(E) " MKINSTALLDIRS $(ELF_INSTALL_DIR) $(libdir)"
73 + $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(ELF_INSTALL_DIR) \
74 + $(DESTDIR)$(libdir)
75 +
76 +installdirs:: installdirs-elf-lib
77 +
78 +install-shlibs install:: $(ELF_LIB) installdirs-elf-lib
79 + $(E) " INSTALL-ELF-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
80 + $(Q) $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
81 + $(E) " SYMLINK $(ELF_INSTALL_DIR)/$(ELF_SONAME)"
82 + $(Q) $(LN_S) -f $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
83 + $(E) " SYMLINK $(libdir)/$(ELF_IMAGE).dylib"
84 + $(Q) if test "$(ELF_INSTALL_DIR)" = "$(libdir)"; then \
85 + $(LN_S) -f $(ELF_SONAME) $(DESTDIR)$(libdir)/$(ELF_IMAGE).dylib ; \
86 + else \
87 + $(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
88 + $(DESTDIR)$(libdir)/$(ELF_IMAGE).dylib; \
89 + fi
90
91 install-strip: install
92 + $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
93 + $(Q) $(STRIP) --strip-unneeded --remove-section=.comment \
94 + --remove-section=.note $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
95
96 install-shlibs-strip: install-shlibs
97 + $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
98 + $(Q) $(STRIP) --strip-unneeded --remove-section=.comment \
99 + --remove-section=.note $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
100
101 uninstall-shlibs uninstall::
102 - $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
103 + $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
104 + $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
105 + $(DESTDIR)$(libdir)/$(ELF_IMAGE).dylib
106
107 clean::
108 $(RM) -rf pic
109 - $(RM) -f $(BSD_LIB)
110 - $(RM) -f ../$(BSD_LIB)
111 - $(RM) -f ../$(BSDLIB_IMAGE).dylib
112 + $(RM) -f $(ELF_LIB)
113 + $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).dylib ../$(ELF_SONAME)

  ViewVC Help
Powered by ViewVC 1.1.20