openbsd-ports

OpenBSD Ports customizations and WIP
git clone git://git.danielmoch.com/openbsd-ports.git
Log | Files | Refs

patch-lib_Makefile_local (1939B)


      1 $OpenBSD$
      2 
      3 Index: lib/Makefile.local
      4 --- lib/Makefile.local.orig
      5 +++ lib/Makefile.local
      6 @@ -16,9 +16,15 @@ LIBNAME = libnotmuch.$(LIBNOTMUCH_VERSION_MAJOR).$(LIB
      7  LIBRARY_LINK_FLAG = -dynamiclib -install_name $(libdir)/$(SONAME) -compatibility_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR) -current_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
      8  else
      9  LIBRARY_SUFFIX = so
     10 +ifeq ($(PLATFORM),OPENBSD)
     11 +LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX).$(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR)
     12 +SONAME = $(LINKER_NAME)
     13 +LIBNAME = $(SONAME)
     14 +else
     15  LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)
     16  SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
     17  LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
     18 +endif
     19  LIBRARY_LINK_FLAG = -shared -Wl,--version-script=$(srcdir)/$(lib)/notmuch.sym,-soname=$(SONAME) $(NO_UNDEFINED_LDFLAGS)
     20  ifeq ($(PLATFORM),OPENBSD)
     21  LIBRARY_LINK_FLAG += -lc
     22 @@ -69,19 +75,23 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
     23  $(dir)/$(LIBNAME): $(libnotmuch_modules) util/libnotmuch_util.a parse-time-string/libparse-time-string.a
     24  	$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libnotmuch_util.a parse-time-string/libparse-time-string.a
     25  
     26 +ifneq ($(SONAME),$(LINKER_NAME))
     27  $(dir)/$(SONAME): $(dir)/$(LIBNAME)
     28  	ln -sf $(LIBNAME) $@
     29  
     30  $(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
     31  	ln -sf $(LIBNAME) $@
     32 +endif
     33  
     34  install: install-$(dir)
     35  
     36  install-$(dir): $(dir)/$(LIBNAME)
     37  	mkdir -p "$(DESTDIR)$(libdir)/"
     38  	install -m0644 "$(lib)/$(LIBNAME)" "$(DESTDIR)$(libdir)/"
     39 +ifneq ($(SONAME),$(LINKER_NAME))
     40  	ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(SONAME)"
     41  	ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(LINKER_NAME)"
     42 +endif
     43  	mkdir -p "$(DESTDIR)$(includedir)"
     44  	install -m0644 "$(srcdir)/$(lib)/notmuch.h" "$(DESTDIR)$(includedir)/"
     45  	$(LIBRARY_INSTALL_POST_COMMAND)