Procházet zdrojové kódy

Canfestival library: add new package

Signed-off-by: Anton Glukhov <anton.a.glukhov@gmail.com>
Anton Glukhov před 9 roky
rodič
revize
ce7ae15a98

+ 68
- 0
libs/libcanfestival/Makefile Zobrazit soubor

@@ -0,0 +1,68 @@
1
+#
2
+# Copyright (C) 2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libcanfestival
11
+PKG_RELEASE:=1
12
+
13
+PKG_SOURCE_PROTO:=hg
14
+PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3
15
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
16
+PKG_SOURCE_VERSION:=8bfe0ac00cdb
17
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
18
+
19
+PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
20
+PKG_LICENSE:=LGPL-2.1+
21
+PKG_LICENSE_FILE:=LICENCE
22
+
23
+PKG_FIXUP:=autoreconf
24
+PKG_INSTALL:=1
25
+
26
+include $(INCLUDE_DIR)/package.mk
27
+
28
+define Package/libcanfestival
29
+  SECTION:=libs
30
+  CATEGORY:=Libraries
31
+  TITLE:=Free software CANopen library
32
+  URL:=http://canfestival.org
33
+  DEPENDS:=+libpthread +librt
34
+endef
35
+
36
+define Package/libcanfestival/description
37
+  CanFestival library
38
+endef
39
+
40
+TARGET_CFLAGS += $(FPIC)
41
+
42
+CONFIGURE_ARGS := \
43
+	--cc=$(TARGET_CC) \
44
+	--cxx=$(TARGET_CXX) \
45
+	--ld=$(TARGET_CC) \
46
+	--arch=$(ARCH) \
47
+	--os=Linux \
48
+	--kerneldir=$(LINUX_DIR) \
49
+	--prefix=/usr \
50
+	--target=unix \
51
+	--can=socket \
52
+	--timers=unix \
53
+	--debug=ERR \
54
+
55
+define Build/InstallDev
56
+	$(INSTALL_DIR) $(1)/usr/include
57
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
58
+
59
+	$(INSTALL_DIR) $(1)/usr/lib
60
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
61
+endef
62
+
63
+define Package/libcanfestival/install
64
+	$(INSTALL_DIR) $(1)/usr/lib
65
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcanfestival_can_socket.so $(1)/usr/lib/
66
+endef
67
+
68
+$(eval $(call BuildPackage,libcanfestival))

+ 11
- 0
libs/libcanfestival/patches/001-sigval-ref-fix.patch Zobrazit soubor

@@ -0,0 +1,11 @@
1
+--- a/drivers/timers_unix/timers_unix.c
2
++++ b/drivers/timers_unix/timers_unix.c
3
+@@ -33,7 +33,7 @@
4
+ 	}
5
+ }
6
+ 
7
+-void timer_notify(sigval_t val)
8
++void timer_notify(void)
9
+ {
10
+ 	if(gettimeofday(&last_sig,NULL)) {
11
+ 		perror("gettimeofday()");

+ 33
- 0
libs/libcanfestival/patches/002-makefile-gcc-linker.patch Zobrazit soubor

@@ -0,0 +1,33 @@
1
+--- a/examples/TestMasterMicroMod/Makefile.in
2
++++ b/examples/TestMasterMicroMod/Makefile.in
3
+@@ -56,7 +56,7 @@
4
+ 
5
+ 
6
+ $(TESTMASTERMICROMOD): $(OBJS)
7
+-	$(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
8
++	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
9
+ 
10
+ 	
11
+ TestMaster.c: TestMaster.od
12
+--- a/examples/TestMasterSlave/Makefile.in
13
++++ b/examples/TestMasterSlave/Makefile.in
14
+@@ -65,7 +65,7 @@
15
+ 
16
+ 
17
+ $(TESTMASTERSLAVE): $(OBJS)
18
+-	$(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
19
++	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
20
+ 	
21
+ TestSlave.c: TestSlave.od
22
+ 	$(MAKE) -C ../../objdictgen gnosis
23
+--- a/examples/CANOpenShell/Makefile.in
24
++++ b/examples/CANOpenShell/Makefile.in
25
+@@ -64,7 +64,7 @@
26
+ 	$(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a
27
+ 
28
+ $(CANOPENSHELL): $(OBJS)
29
+-	$(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
30
++	$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS)
31
+ 	mkdir -p Debug; cp $(CANOPENSHELL) Debug
32
+ 	
33
+ CANOpenShellMasterOD.c: CANOpenShellMasterOD.od