[PATCH] fdo#45090: copy LDAP library to postgresql-sdbc .oxt file
Lionel Elie Mamane
lionel at mamane.lu
Sun Jan 22 09:48:22 PST 2012
---
connectivity/source/drivers/postgresql/makefile.mk | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/connectivity/source/drivers/postgresql/makefile.mk b/connectivity/source/drivers/postgresql/makefile.mk
index cc6a4df..dcd5842 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -88,13 +88,13 @@ LIBPQ_DEP_LIBS += \
.IF "$(WITH_LDAP)" == "YES"
LIBPQ_DEP_LIBS+=\
$(LDAPSDKLIB)
-.ENDIF
-.ELSE
+.ENDIF # WITH_LDAP == YES
+.ELSE # Not MSVC on MSWindows
LIBPQ_LINK=$(OUTDIR)/lib/libpq.a
LIBPQ_DEP_LIBS+=$(eq,$(OS),MACOSX $(NULL) -Wl,--as-needed)
.INCLUDE : $(OUTDIR_FOR_BUILD)/inc/postgresql/libpq-flags.mk
LIBPQ_DEP_LIBS+=$(eq,$(OS),MACOSX $(NULL) -Wl,--no-as-needed)
-.ENDIF
+.ENDIF # MSVC on MSWindows
POSTGRESQL_INC=-I$(OUTDIR)/inc/postgresql
POSTGRESQL_LIB=
.ENDIF # SYSTEM_POSTGRESQL
@@ -191,11 +191,22 @@ INI_EXT=.ini
$(DLLDEST)$/$(SHL1TARGET)$(INI_EXT): $(SHL1TARGET)
+cp $? $@
+LDAP_LIBFILE_OUTDIR=
+LDAP_LIBFILE_FNAME=
+.IF "$(GUI)"!="WNT" && "$(SYSTEM_POSTGRESQL)"!="YES" && "$(WITH_LDAP)" == "YES" && "$(WITH_OPENLDAP)" != "YES" && "$(SYSTEM_MOZILLA)" != "YES"
+LDAP_LIBFILE_FULLPATH := $(OUTDIR)$/lib$/$(shell echo '$(LDAPSDKLIB)' | sed -e 's/^-l/lib/' -e 's/\.lib$//' )$(DLLPOST)
+LDAP_LIBFILE_FNAME := $(LDAP_LIBFILE_FULLPATH:f)
+LDAP_LIBFILE_OUTDIR += $(DLLDEST)$/$(LDAP_LIBFILE_FNAME)
+$(LDAP_LIBFILE_OUTDIR): $(LDAP_LIBFILE_FULLPATH)
+ +cp $? $@
+.ENDIF
+
$(DLLDEST)$/$(DRIVERNAME): \
$(DLLDEST)$/META-INF$/manifest.xml \
$(DLLDEST)$/description.xml \
$(DLLDEST)$/description/description_en-US.txt \
$(DLLDEST)$/postgresql.xcu \
+ $(LDAP_LIBFILE_OUTDIR) \
$(DLLDEST)$/$(SHL1TARGET)$(DLLPOST) \
$(DLLDEST)$/$(SHL2TARGET)$(DLLPOST) \
$(DLLDEST)$/$(SHL1TARGET)$(INI_EXT)
@@ -205,6 +216,7 @@ $(DLLDEST)$/$(DRIVERNAME): \
$(SHL1TARGET)$(DLLPOST) \
$(SHL2TARGET)$(DLLPOST) \
$(SHL1TARGET)$(INI_EXT) \
+ $(LDAP_LIBFILE_FNAME) \
description.xml \
description/description_en-US.txt \
postgresql.xcu
--
1.7.7.3
--zYM0uCDKw75PZbzx--
More information about the LibreOffice
mailing list