summaryrefslogtreecommitdiff
path: root/www/firefox-sync/files/patch-crypto-obsolete-src-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox-sync/files/patch-crypto-obsolete-src-Makefile')
-rw-r--r--www/firefox-sync/files/patch-crypto-obsolete-src-Makefile123
1 files changed, 123 insertions, 0 deletions
diff --git a/www/firefox-sync/files/patch-crypto-obsolete-src-Makefile b/www/firefox-sync/files/patch-crypto-obsolete-src-Makefile
new file mode 100644
index 000000000000..4a647c3cd761
--- /dev/null
+++ b/www/firefox-sync/files/patch-crypto-obsolete-src-Makefile
@@ -0,0 +1,123 @@
+--- crypto-obsolete/src/Makefile.orig 2010-04-29 01:34:41.000000000 +0200
++++ crypto-obsolete/src/Makefile 2010-05-01 12:44:11.424608405 +0200
+@@ -63,6 +63,17 @@
+ so = so
+ cppflags += -shared
+ else
++ifeq ($(sys), FreeBSD)
++ os = FreeBSD
++ compiler = gcc3
++ cxx = c++
++ so = so
++ cppflags += -shared
++ ldflags += -L$(PREFIX)/lib/firefox3 -L$(PREFIX)/lib -lc
++ xpidl = $(PREFIX)/lib/libxul/xpidl \
++ -I$(PREFIX)/share/idl/firefox3 \
++ -I$(PREFIX)/share/idl/firefox3/stable
++else
+ ifeq ($(sys), MINGW32_NT-6.1)
+ os = WINNT
+ compiler = msvc
+@@ -89,6 +100,7 @@
+ endif
+ endif
+ endif
++endif
+
+ # Arch detection
+
+@@ -118,6 +130,9 @@
+ ifeq ($(machine), x86_64)
+ arch = x86_64
+ else
++ifeq ($(machine), amd64)
++ arch = amd64
++else
+ $(error: Sorry, your architecture is unknown/unsupported: $(machine))
+ endif
+ endif
+@@ -127,6 +142,7 @@
+ endif
+ endif
+ endif
++endif
+
+ # Universal binary so no need for $(arch) for Darwin
+
+@@ -183,6 +199,14 @@
+ -I$(sdkdir)/include/nspr \
+ -I$(sdkdir)/sdk/include
+
++ifeq ($(sys), FreeBSD)
++ headers += -I$(PREFIX)/include/firefox3 \
++ -I$(PREFIX)/include/firefox3/stable \
++ -I$(PREFIX)/include/nspr \
++ -I$(PREFIX)/include/nss \
++ -I$(PREFIX)/include/firefox3/unstable
++endif
++
+ # libraries
+ libdirs := $(sdkdir)/lib $(sdkdir)/bin
+ ifeq ($(wince),1)
+@@ -197,6 +221,10 @@
+
+ ifeq ($(os), Linux)
+ libs := xpcom_core $(libs)
++else
++ifeq ($(os), FreeBSD)
++ libs := xpcom $(libs)
++endif
+ endif
+
+ # compiler and Linker Flags
+@@ -259,6 +287,25 @@
+ $(sdkdir)/lib/libxpcomglue_s.a \
+ $(libdirs) $(libs)
+ else
++ifeq ($(os), FreeBSD)
++ libdirs := $(patsubst %,-L%,$(libdirs))
++ libs := $(patsubst %,-l%,$(libs))
++ cppflags += -pipe -O2 \
++ -fPIC -fno-rtti -fno-exceptions -fno-strict-aliasing \
++ -fno-common -pthread \
++ -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth \
++ -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align \
++ -Wno-long-long \
++ -include xpcom-config.h $(headers) \
++ -fshort-wchar
++ ldflags += -pthread -pipe -DMOZILLA_STRICT_API \
++ -Wl,-dead_strip \
++ -Wl,-exported_symbol \
++ -Wl,-z,defs -Wl,-h,WeaveCrypto.so \
++ -Wl,-rpath-link,$(sdkdir)/bin \
++ $(sdkdir)/lib/libxpcomglue_s.a \
++ $(libdirs) $(libs)
++else
+ ifeq ($(os), SunOS)
+ libdirs := $(patsubst %,-L%,$(libdirs))
+ libs := $(patsubst %,-l%,$(libs))
+@@ -298,6 +345,7 @@
+ endif
+ endif
+ endif
++endif
+
+ ######################################################################
+
+@@ -345,6 +393,11 @@
+ $(cxx) $(cppflags) -o $@ $(cpp_sources) $(ldflags)
+ chmod +x $@
+ else
++ifeq ($(os), FreeBSD)
++ $(so_target): $(idl_header)
++ $(cxx) $(cppflags) -o $@ $(cpp_sources) $(ldflags)
++ chmod +x $@
++else
+ ifeq ($(os), SunOS)
+ $(so_target): $(idl_header)
+ $(cxx) $(cppflags) -o $@ $(cpp_sources) $(ldflags)
+@@ -364,3 +417,4 @@
+ endif
+ endif
+ endif
++endif