diff options
author | Jay Freeman <saurik@saurik.com> | 2008-02-03 13:20:05 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-02-03 13:20:05 +0000 |
commit | f648dabb05b3e53cc68ef896a08d39da19d8972c (patch) | |
tree | 57939c497bd79b94841329a8de69c4b7d257bade /data/apt/dylib.diff | |
parent | 0d6804844ad63c28476609d396162a4ea25ac6d2 (diff) |
Fixed the install_name on libapt-pkg to make setuid installation software work.
git-svn-id: http://svn.telesphoreo.org/trunk@64 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/apt/dylib.diff')
-rw-r--r-- | data/apt/dylib.diff | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/data/apt/dylib.diff b/data/apt/dylib.diff new file mode 100644 index 000000000..b9b87d3a7 --- /dev/null +++ b/data/apt/dylib.diff @@ -0,0 +1,55 @@ +diff -ru apt-0.6.46.4.1/buildlib/library.mak apt-0.6.46.4.1+iPhone/buildlib/library.mak +--- apt-0.6.46.4.1/buildlib/library.mak 2006-12-04 14:37:35.000000000 +0000 ++++ apt-0.6.46.4.1+iPhone/buildlib/library.mak 2008-01-30 17:05:02.000000000 +0000 +@@ -16,11 +16,11 @@ + # See defaults.mak for information about LOCAL + + # Some local definitions +-LOCAL := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR) ++LOCAL := lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR) + $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE))))) + $(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE))))) + $(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS)) +-$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) ++$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR) + $(LOCAL)-SLIBS := $(SLIBS) + $(LOCAL)-LIBRARY := $(LIBRARY) + +@@ -29,7 +29,7 @@ + + # Install the command hooks + headers: $($(LOCAL)-HEADERS) +-library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) ++library: $(LIB)/lib$(LIBRARY).dylib $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR) + clean: clean/$(LOCAL) + veryclean: veryclean/$(LOCAL) + +@@ -41,21 +41,21 @@ + clean/$(LOCAL): + -rm -f $($(@F)-OBJS) $($(@F)-DEP) + veryclean/$(LOCAL): clean/$(LOCAL) +- -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so* ++ -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.dylib* + + # Build rules for the two symlinks +-.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so +-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR) ++.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR) $(LIB)/lib$(LIBRARY).dylib ++$(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR) + ln -sf $(<F) $@ +-$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR) ++$(LIB)/lib$(LIBRARY).dylib: $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR) + ln -sf $(<F) $@ + + # The binary build rule +-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) +- -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null ++$(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) ++ -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.dylib* 2> /dev/null + echo Building shared library $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\ +- -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \ ++ -o $@ -Wl,-dylib_install_name,$(patsubst $(LIB)/%,/usr/lib/%,$@) -dynamiclib \ + $(filter %.opic,$^) \ + $($(@F)-SLIBS) + |