summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO25
-rw-r--r--LICENSE.txt9
-rw-r--r--PKGBUILD44
-rw-r--r--catkin.patch60
4 files changed, 138 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..52939228b266
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+# Generated by mksrcinfo v8
+# Fri Feb 19 00:26:47 UTC 2016
+pkgbase = serial
+ pkgdesc = Cross-platform, Serial Port library written in C++
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = http://wjwwood.io/serial/
+ arch = i686
+ arch = x86_64
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = MIT
+ makedepends = cmake
+ makedepends = doxygen
+ source = https://github.com/wjwwood/serial/archive/1.2.1.tar.gz
+ source = catkin.patch
+ source = LICENSE.txt
+ md5sums = b6d9ebdf821654715656577652b61b64
+ md5sums = 49def33e7828e316c1baa66a69f8ba19
+ md5sums = cf59308969fbe23545aa5679666b553b
+
+pkgname = serial
+
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 000000000000..db141687733f
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 William Woodall
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b82d2009b09c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Romain Reignier <rom.reignier at gmail dot com>
+
+pkgname=serial
+pkgver=1.2.1
+pkgrel=1
+pkgdesc="Cross-platform, Serial Port library written in C++"
+arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="http://wjwwood.io/serial/"
+license=('MIT')
+makedepends=('cmake' 'doxygen')
+source=("https://github.com/wjwwood/${pkgname}/archive/${pkgver}.tar.gz"
+ "catkin.patch"
+ "LICENSE.txt")
+md5sums=('b6d9ebdf821654715656577652b61b64'
+ '49def33e7828e316c1baa66a69f8ba19'
+ 'cf59308969fbe23545aa5679666b553b')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 -i ../catkin.patch
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ mkdir build
+ cd build
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ ..
+ make
+ cd ..
+ make doc
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
+
+ mkdir -p "$pkgdir/usr/share/doc/$pkgname"
+ cp -a "doc/html" "$pkgdir/usr/share/doc/$pkgname/"
+
+ install -Dm644 ../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/catkin.patch b/catkin.patch
new file mode 100644
index 000000000000..957dd59e77af
--- /dev/null
+++ b/catkin.patch
@@ -0,0 +1,60 @@
+diff -aur serial-1.2.1.pristine/CMakeLists.txt serial-1.2.1.new/CMakeLists.txt
+--- serial-1.2.1.pristine/CMakeLists.txt 2016-02-18 23:09:09.037989467 +0100
++++ serial-1.2.1.new/CMakeLists.txt 2016-02-19 01:19:59.568329056 +0100
+@@ -2,26 +2,34 @@
+ project(serial)
+
+ # Find catkin
+-find_package(catkin REQUIRED)
++option(BUILD_WITH_CATKIN "Build using catkin" OFF)
++if(BUILD_WITH_CATKIN)
++ find_package(catkin REQUIRED)
++endif()
+
+ if(APPLE)
+ find_library(IOKIT_LIBRARY IOKit)
+ find_library(FOUNDATION_LIBRARY Foundation)
+ endif()
+
+-if(UNIX AND NOT APPLE)
+- # If Linux, add rt and pthread
+- catkin_package(
+- LIBRARIES ${PROJECT_NAME}
+- INCLUDE_DIRS include
+- DEPENDS rt pthread
+- )
++if(catkin_FOUND)
++ if(UNIX AND NOT APPLE)
++ # If Linux, add rt and pthread
++ catkin_package(
++ LIBRARIES ${PROJECT_NAME}
++ INCLUDE_DIRS include
++ DEPENDS rt pthread
++ )
++ else()
++ # Otherwise normal call
++ catkin_package(
++ LIBRARIES ${PROJECT_NAME}
++ INCLUDE_DIRS include
++ )
++ endif()
+ else()
+- # Otherwise normal call
+- catkin_package(
+- LIBRARIES ${PROJECT_NAME}
+- INCLUDE_DIRS include
+- )
++ set(CATKIN_PACKAGE_LIB_DESTINATION lib)
++ set(CATKIN_GLOBAL_INCLUDE_DESTINATION include)
+ endif()
+
+ ## Sources
+@@ -45,7 +53,7 @@
+ endif()
+
+ ## Add serial library
+-add_library(${PROJECT_NAME} ${serial_SRCS})
++add_library(${PROJECT_NAME} SHARED ${serial_SRCS})
+ if(APPLE)
+ target_link_libraries(${PROJECT_NAME} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY})
+ elseif(UNIX)