diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-20 20:49:46 -0500 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-23 20:18:47 -0500 |
commit | 12335518ab39608d58370c85ff9f5384ad2aa5f7 (patch) | |
tree | 352d81f2a2de3f1252af732080ec0fde38c13b4d /homebrew/openzwave | |
parent | a2b26ad12d4fa12f0273645caf4be6d0b8b71e7c (diff) |
Ported in the homebrew-marauder for a hacky update/import system.
TODO: Maybe add a license & fix up messy code.
Diffstat (limited to 'homebrew/openzwave')
-rw-r--r-- | homebrew/openzwave/.beer | 114 | ||||
-rw-r--r-- | homebrew/openzwave/.make.sh-auto | 4 | ||||
-rw-r--r-- | homebrew/openzwave/_metadata/description | 1 | ||||
-rw-r--r-- | homebrew/openzwave/_metadata/homepage | 1 | ||||
-rw-r--r-- | homebrew/openzwave/_metadata/name | 1 | ||||
-rw-r--r-- | homebrew/openzwave/_metadata/version | 1 | ||||
-rwxr-xr-x | homebrew/openzwave/download.sh | 1 | ||||
-rwxr-xr-x | homebrew/openzwave/patches.sh | 93 |
8 files changed, 216 insertions, 0 deletions
diff --git a/homebrew/openzwave/.beer b/homebrew/openzwave/.beer new file mode 100644 index 000000000..22bc49165 --- /dev/null +++ b/homebrew/openzwave/.beer @@ -0,0 +1,114 @@ +{ + "name": "OpenZwave", + "description": "Library for selected Z-Wave PC controllers", + "url": "http://old.openzwave.com/downloads/openzwave-1.2.919.tar.gz", + "mirror": null, + "homepage": "http://www.openzwave.com", + "depends": [], + "resource": [], + "conflicts": [], + "patches": [ + { + "url": null, + "data": [ + "diff --git a/cpp/build/Makefile b/cpp/build/Makefile\n", + "index 24df4f5..b064029 100644\n", + "--- a/cpp/build/Makefile\n", + "+++ b/cpp/build/Makefile\n", + "@@ -23,16 +23,24 @@ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../)\n", + "\n", + " include $(top_srcdir)/cpp/build/support.mk\n", + "\n", + "+#Mac prefers a dylib, not a so\n", + "+ifeq ($(UNAME),Darwin)\n", + "+SHARED_LIB_NAME=libopenzwave-$(VERSION).dylib\n", + "+SHARED_LIB_UNVERSIONED=libopenzwave.dylib\n", + "+else\n", + "+SHARED_LIB_NAME=libopenzwave.so.$(VERSION)\n", + "+SHARED_LIB_UNVERSIONED=libopenzwave.so\n", + "+endif\n", + "\n", + " #if we are on a Mac, add these flags and libs to the compile and link phases\n", + " ifeq ($(UNAME),Darwin)\n", + " CFLAGS\t+= -c -DDARWIN -arch i386 -arch x86_64\n", + "-LDFLAGS += -arch i386 -arch x86_64\n", + "+LDFLAGS += -arch i386 -arch x86_64 -dynamiclib\n", + " LIBS\t+= -framework IOKit -framework CoreFoundation -arch i386 -arch x86_64\n", + " else ifeq ($(UNAME),FreeBSD)\n", + " CFLAGS += -I/usr/local/include\n", + " else\n", + "-LDFLAGS += -Wl,-soname,libopenzwave.so.$(VERSION)\n", + "+LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB_NAME)\n", + " LIBS \t+= -ludev\n", + " endif\n", + "\n", + "@@ -74,10 +82,10 @@ indep := $(notdir $(filter-out $(top_srcdir)/cpp/src/vers.cpp, $(wildcard $(top_\n", + " aes := $(notdir $(wildcard $(top_srcdir)/cpp/src/aes/*.c))\n", + "\n", + "\n", + "-default: $(LIBDIR)/libopenzwave.a $(LIBDIR)/libopenzwave.so.$(VERSION)\n", + "+default: $(LIBDIR)/libopenzwave.a $(LIBDIR)/$(SHARED_LIB_NAME)\n", + "\n", + " clean:\n", + "-\t@rm -rf $(DEPDIR) $(OBJDIR) $(LIBDIR)/libopenzwave.so* $(LIBDIR)/libopenzwave.a $(top_builddir)/libopenzwave.pc $(top_builddir)/docs/api $(top_builddir)/Doxyfile\n", + "+\t@rm -rf $(DEPDIR) $(OBJDIR) $(LIBDIR)/libopenzwave.so* $(LIBDIR)/libopenzwave-*.dylib $(LIBDIR)/libopenzwave.a $(top_builddir)/libopenzwave.pc $(top_builddir)/docs/api $(top_builddir)/Doxyfile\n", + "\n", + "\n", + " -include $(patsubst %.cpp,$(DEPDIR)/%.d,$(tinyxml))\n", + "@@ -110,7 +118,7 @@ $(LIBDIR)/libopenzwave.a:\t$(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \\\n", + " \t@$(AR) $@ $+\n", + " \t@$(RANLIB) $@\n", + "\n", + "-$(LIBDIR)/libopenzwave.so.$(VERSION):\t$(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \\\n", + "+$(LIBDIR)/$(SHARED_LIB_NAME):\t$(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \\\n", + " \t\t\t$(patsubst %.c,$(OBJDIR)/%.o,$(hidapi)) \\\n", + " \t\t\t$(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \\\n", + " \t\t\t$(patsubst %.cpp,$(OBJDIR)/%.o,$(cclasses)) \\\n", + "@@ -120,7 +128,7 @@ $(LIBDIR)/libopenzwave.so.$(VERSION):\t$(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml))\n", + " \t\t\t$(OBJDIR)/vers.o\n", + " \t@echo \"Linking Shared Library\"\n", + "-\t@$(LD) $(LDFLAGS) -shared -o $@ $+ $(LIBS)\n", + "-\t@ln -sf libopenzwave.so.$(VERSION) $(LIBDIR)/libopenzwave.so\n", + "+\t@$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)\n", + "+\t@ln -sf $(SHARED_LIB_NAME) $(LIBDIR)/$(SHARED_LIB_UNVERSIONED)\n", + "\n", + " ifeq ($(PKGCONFIG),)\n", + " $(top_builddir)/libopenzwave.pc: $(top_srcdir)/cpp/build/libopenzwave.pc.in\n", + "@@ -155,10 +163,10 @@ doc: $(top_builddir)/Doxyfile\n", + " \t@cd $(top_builddir); $(DOXYGEN)\n", + " endif\n", + "\n", + "-install: $(LIBDIR)/libopenzwave.so.$(VERSION) doc $(top_builddir)/libopenzwave.pc\n", + "+install: $(LIBDIR)/$(SHARED_LIB_NAME) doc $(top_builddir)/libopenzwave.pc\n", + " \tinstall -d $(DESTDIR)/$(instlibdir)/\n", + "-\tcp $(LIBDIR)/libopenzwave.so.$(VERSION) $(DESTDIR)/$(instlibdir)/libopenzwave.so.$(VERSION)\n", + "-\tln -sf libopenzwave.so.$(VERSION) $(DESTDIR)/$(instlibdir)/libopenzwave.so\n", + "+\tcp $(LIBDIR)/$(SHARED_LIB_NAME) $(DESTDIR)/$(instlibdir)/$(SHARED_LIB_NAME)\n", + "+\tln -sf $(SHARED_LIB_NAME) $(DESTDIR)/$(instlibdir)/$(SHARED_LIB_UNVERSIONED)\n", + " \tinstall -d $(DESTDIR)/$(includedir)\n", + " \tinstall -m 0644 $(top_srcdir)/cpp/src/*.h $(DESTDIR)/$(includedir)\n", + " \tinstall -d $(DESTDIR)/$(includedir)/command_classes/\n", + "diff --git a/cpp/examples/MinOZW/Makefile b/cpp/examples/MinOZW/Makefile\n", + "index 0f1fd50..3805a39 100644\n", + "--- a/cpp/examples/MinOZW/Makefile\n", + "+++ b/cpp/examples/MinOZW/Makefile\n", + "@@ -19,7 +19,7 @@ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../../)\n", + "\n", + "\n", + " INCLUDES\t:= -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/ -I $(top_srcdir)/cpp/hidapi/hidapi/\n", + "-LIBS = $(wildcard $(LIBDIR)/*.so $(top_builddir)/*.so $(top_builddir)/cpp/build/*.so )\n", + "+LIBS = $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/*.so $(top_builddir)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib )\n", + " LIBSDIR = $(abspath $(dir $(firstword $(LIBS))))\n", + " minozwsrc := $(notdir $(wildcard $(top_srcdir)/cpp/examples/MinOZW/*.cpp))\n", + " VPATH := $(top_srcdir)/cpp/examples/MinOZW\n" + ] + } + ], + "install": [ + "ENV[\"BUILD\"] = \"release\"", + "ENV[\"PREFIX\"] = prefix", + "system \"make\", \"install\"" + ], + "version": "1.2.919", + "file": "open-zwave.rb" +}
\ No newline at end of file diff --git a/homebrew/openzwave/.make.sh-auto b/homebrew/openzwave/.make.sh-auto new file mode 100644 index 000000000..6cfe4eae2 --- /dev/null +++ b/homebrew/openzwave/.make.sh-auto @@ -0,0 +1,4 @@ +pkg:setup +ENV["BUILD"] = "release" +ENV["PREFIX"] = prefix +make DESTDIR=${PKG_DEST} install diff --git a/homebrew/openzwave/_metadata/description b/homebrew/openzwave/_metadata/description new file mode 100644 index 000000000..3174a27b8 --- /dev/null +++ b/homebrew/openzwave/_metadata/description @@ -0,0 +1 @@ +Library for selected Z-Wave PC controllers diff --git a/homebrew/openzwave/_metadata/homepage b/homebrew/openzwave/_metadata/homepage new file mode 100644 index 000000000..8097b1921 --- /dev/null +++ b/homebrew/openzwave/_metadata/homepage @@ -0,0 +1 @@ +http://www.openzwave.com diff --git a/homebrew/openzwave/_metadata/name b/homebrew/openzwave/_metadata/name new file mode 100644 index 000000000..442587b03 --- /dev/null +++ b/homebrew/openzwave/_metadata/name @@ -0,0 +1 @@ +OpenZwave diff --git a/homebrew/openzwave/_metadata/version b/homebrew/openzwave/_metadata/version new file mode 100644 index 000000000..4fbe7656c --- /dev/null +++ b/homebrew/openzwave/_metadata/version @@ -0,0 +1 @@ +1.2.919 diff --git a/homebrew/openzwave/download.sh b/homebrew/openzwave/download.sh new file mode 100755 index 000000000..3d12025eb --- /dev/null +++ b/homebrew/openzwave/download.sh @@ -0,0 +1 @@ +wget http://old.openzwave.com/downloads/openzwave-1.2.919.tar.gz
\ No newline at end of file diff --git a/homebrew/openzwave/patches.sh b/homebrew/openzwave/patches.sh new file mode 100755 index 000000000..1f1bdb74c --- /dev/null +++ b/homebrew/openzwave/patches.sh @@ -0,0 +1,93 @@ +echo 'Creating brew-patch.diff' +cat << EOF >> brew-patch.diff +diff --git a/cpp/build/Makefile b/cpp/build/Makefile +index 24df4f5..b064029 100644 +--- a/cpp/build/Makefile ++++ b/cpp/build/Makefile +@@ -23,16 +23,24 @@ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../) + + include $(top_srcdir)/cpp/build/support.mk + ++#Mac prefers a dylib, not a so ++ifeq ($(UNAME),Darwin) ++SHARED_LIB_NAME=libopenzwave-$(VERSION).dylib ++SHARED_LIB_UNVERSIONED=libopenzwave.dylib ++else ++SHARED_LIB_NAME=libopenzwave.so.$(VERSION) ++SHARED_LIB_UNVERSIONED=libopenzwave.so ++endif + + #if we are on a Mac, add these flags and libs to the compile and link phases + ifeq ($(UNAME),Darwin) + CFLAGS += -c -DDARWIN -arch i386 -arch x86_64 +-LDFLAGS += -arch i386 -arch x86_64 ++LDFLAGS += -arch i386 -arch x86_64 -dynamiclib + LIBS += -framework IOKit -framework CoreFoundation -arch i386 -arch x86_64 + else ifeq ($(UNAME),FreeBSD) + CFLAGS += -I/usr/local/include + else +-LDFLAGS += -Wl,-soname,libopenzwave.so.$(VERSION) ++LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB_NAME) + LIBS += -ludev + endif + +@@ -74,10 +82,10 @@ indep := $(notdir $(filter-out $(top_srcdir)/cpp/src/vers.cpp, $(wildcard $(top_ + aes := $(notdir $(wildcard $(top_srcdir)/cpp/src/aes/*.c)) + + +-default: $(LIBDIR)/libopenzwave.a $(LIBDIR)/libopenzwave.so.$(VERSION) ++default: $(LIBDIR)/libopenzwave.a $(LIBDIR)/$(SHARED_LIB_NAME) + + clean: +- @rm -rf $(DEPDIR) $(OBJDIR) $(LIBDIR)/libopenzwave.so* $(LIBDIR)/libopenzwave.a $(top_builddir)/libopenzwave.pc $(top_builddir)/docs/api $(top_builddir)/Doxyfile ++ @rm -rf $(DEPDIR) $(OBJDIR) $(LIBDIR)/libopenzwave.so* $(LIBDIR)/libopenzwave-*.dylib $(LIBDIR)/libopenzwave.a $(top_builddir)/libopenzwave.pc $(top_builddir)/docs/api $(top_builddir)/Doxyfile + + + -include $(patsubst %.cpp,$(DEPDIR)/%.d,$(tinyxml)) +@@ -110,7 +118,7 @@ $(LIBDIR)/libopenzwave.a: $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \ + @$(AR) $@ $+ + @$(RANLIB) $@ + +-$(LIBDIR)/libopenzwave.so.$(VERSION): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \ ++$(LIBDIR)/$(SHARED_LIB_NAME): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \ + $(patsubst %.c,$(OBJDIR)/%.o,$(hidapi)) \ + $(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \ + $(patsubst %.cpp,$(OBJDIR)/%.o,$(cclasses)) \ +@@ -120,7 +128,7 @@ $(LIBDIR)/libopenzwave.so.$(VERSION): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) + $(OBJDIR)/vers.o + @echo "Linking Shared Library" +- @$(LD) $(LDFLAGS) -shared -o $@ $+ $(LIBS) +- @ln -sf libopenzwave.so.$(VERSION) $(LIBDIR)/libopenzwave.so ++ @$(LD) $(LDFLAGS) -o $@ $+ $(LIBS) ++ @ln -sf $(SHARED_LIB_NAME) $(LIBDIR)/$(SHARED_LIB_UNVERSIONED) + + ifeq ($(PKGCONFIG),) + $(top_builddir)/libopenzwave.pc: $(top_srcdir)/cpp/build/libopenzwave.pc.in +@@ -155,10 +163,10 @@ doc: $(top_builddir)/Doxyfile + @cd $(top_builddir); $(DOXYGEN) + endif + +-install: $(LIBDIR)/libopenzwave.so.$(VERSION) doc $(top_builddir)/libopenzwave.pc ++install: $(LIBDIR)/$(SHARED_LIB_NAME) doc $(top_builddir)/libopenzwave.pc + install -d $(DESTDIR)/$(instlibdir)/ +- cp $(LIBDIR)/libopenzwave.so.$(VERSION) $(DESTDIR)/$(instlibdir)/libopenzwave.so.$(VERSION) +- ln -sf libopenzwave.so.$(VERSION) $(DESTDIR)/$(instlibdir)/libopenzwave.so ++ cp $(LIBDIR)/$(SHARED_LIB_NAME) $(DESTDIR)/$(instlibdir)/$(SHARED_LIB_NAME) ++ ln -sf $(SHARED_LIB_NAME) $(DESTDIR)/$(instlibdir)/$(SHARED_LIB_UNVERSIONED) + install -d $(DESTDIR)/$(includedir) + install -m 0644 $(top_srcdir)/cpp/src/*.h $(DESTDIR)/$(includedir) + install -d $(DESTDIR)/$(includedir)/command_classes/ +diff --git a/cpp/examples/MinOZW/Makefile b/cpp/examples/MinOZW/Makefile +index 0f1fd50..3805a39 100644 +--- a/cpp/examples/MinOZW/Makefile ++++ b/cpp/examples/MinOZW/Makefile +@@ -19,7 +19,7 @@ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../../) + + + INCLUDES := -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/ -I $(top_srcdir)/cpp/hidapi/hidapi/ +-LIBS = $(wildcard $(LIBDIR)/*.so $(top_builddir)/*.so $(top_builddir)/cpp/build/*.so ) ++LIBS = $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/*.so $(top_builddir)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib ) + LIBSDIR = $(abspath $(dir $(firstword $(LIBS)))) + minozwsrc := $(notdir $(wildcard $(top_srcdir)/cpp/examples/MinOZW/*.cpp)) + VPATH := $(top_srcdir)/cpp/examples/MinOZW +EOF |