summaryrefslogtreecommitdiff
path: root/comms/hackrf-devel
diff options
context:
space:
mode:
authorMichael Reifenberger <mr@FreeBSD.org>2021-01-24 23:12:47 +0000
committerMichael Reifenberger <mr@FreeBSD.org>2021-01-24 23:12:47 +0000
commit5e93e43928adb39e2ca7423f7869c9512bdd944d (patch)
tree9fcf36c633e768783022e0e6303aac7be877622a /comms/hackrf-devel
parentdevel/aphpunit: Upgrade from 1.9 to 2.0 (diff)
Readd hackrf-devel with missing files.
make index builds for me now. Copy hackrf to hackrf-devel and update to a current snapshot of hackrf
Diffstat (limited to 'comms/hackrf-devel')
-rw-r--r--comms/hackrf-devel/Makefile28
-rw-r--r--comms/hackrf-devel/Makefile.git_rev3
-rw-r--r--comms/hackrf-devel/distinfo3
-rw-r--r--comms/hackrf-devel/files/newVersion.sh22
-rw-r--r--comms/hackrf-devel/files/patch-host_hackrf-tools_CMakeLists.txt11
-rw-r--r--comms/hackrf-devel/files/patch-host_libhackrf_CMakeLists.txt11
-rw-r--r--comms/hackrf-devel/pkg-descr7
-rw-r--r--comms/hackrf-devel/pkg-plist14
8 files changed, 99 insertions, 0 deletions
diff --git a/comms/hackrf-devel/Makefile b/comms/hackrf-devel/Makefile
new file mode 100644
index 000000000000..d03af3d94660
--- /dev/null
+++ b/comms/hackrf-devel/Makefile
@@ -0,0 +1,28 @@
+# Created by: Tomasz "CeDeROM" CEDRO (http://www.tomek.cedro.info)
+# $FreeBSD$
+
+PORTNAME= hackrf
+PORTVERSION= g${GIT_SRC_DATE}
+CATEGORIES= comms devel hamradio science security
+PKGNAMESUFFIX= -devel
+
+MAINTAINER= mr@freebsd.org
+COMMENT= Low cost open source hardware software radio platform
+
+LICENSE= GPLv2
+
+CONFLICTS= hackrf
+
+USE_GITHUB= YES
+GH_ACCOUNT= mossmann
+GH_TAGNAME= ${GIT_SRC_HASH}
+
+USES= cmake
+CMAKE_SOURCE_PATH= ${WRKSRC}/host
+CMAKE_ARGS= -DLIBUSB_LIBRARIES=/usr/lib/libusb.so
+
+USE_LDCONFIG= yes
+
+.include "Makefile.git_rev"
+
+.include <bsd.port.mk>
diff --git a/comms/hackrf-devel/Makefile.git_rev b/comms/hackrf-devel/Makefile.git_rev
new file mode 100644
index 000000000000..988fd2de7913
--- /dev/null
+++ b/comms/hackrf-devel/Makefile.git_rev
@@ -0,0 +1,3 @@
+# $FreeBSD$
+GIT_SRC_HASH= ee44d2d62e2dd24648599172f90fc8fc2e3b3cc3
+GIT_SRC_DATE= 2021.01.24
diff --git a/comms/hackrf-devel/distinfo b/comms/hackrf-devel/distinfo
new file mode 100644
index 000000000000..93420ec37dcd
--- /dev/null
+++ b/comms/hackrf-devel/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1611498095
+SHA256 (mossmann-hackrf-g2021.01.24-ee44d2d62e2dd24648599172f90fc8fc2e3b3cc3_GH0.tar.gz) = d558885810aaa6ed087239d49c8160446887fccb0b8e14a06d80851eef0f2fc0
+SIZE (mossmann-hackrf-g2021.01.24-ee44d2d62e2dd24648599172f90fc8fc2e3b3cc3_GH0.tar.gz) = 15208743
diff --git a/comms/hackrf-devel/files/newVersion.sh b/comms/hackrf-devel/files/newVersion.sh
new file mode 100644
index 000000000000..f5fda28da77b
--- /dev/null
+++ b/comms/hackrf-devel/files/newVersion.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+CURDIR=`pwd`
+WRKDIR=`pwd`/work
+#mkdir -p "${WRKDIR}"
+
+if [ \! -d "${CURDIR}/kicad-repo" ]; then
+ git clone https://github.com/mossmann/hackrf.git -b master "${CURDIR}/hackrf-repo";
+else
+ cd "${CURDIR}/hackrf-repo"
+ git pull https://github.com/mossmann/hackrf.git;
+fi
+
+cd "${CURDIR}/hackrf-repo"
+GIT_SRC_HASH=`git log -n 1 --pretty=format:"%H"`;
+GIT_SRC_DATE=`git log -n 1 --date=iso-local -n 1 --pretty=format:"%cd" | \
+ cut -c '1-10' | sed -e 's,-,.,g' `
+
+echo "$GIT_SRC_HASH, $GIT_SRC_DATE"
+echo "GIT_SRC_HASH= ${GIT_SRC_HASH}" > ${CURDIR}/Makefile.git_rev
+echo "GIT_SRC_DATE= ${GIT_SRC_DATE}" >> ${CURDIR}/Makefile.git_rev
+
diff --git a/comms/hackrf-devel/files/patch-host_hackrf-tools_CMakeLists.txt b/comms/hackrf-devel/files/patch-host_hackrf-tools_CMakeLists.txt
new file mode 100644
index 000000000000..74a62fe9f785
--- /dev/null
+++ b/comms/hackrf-devel/files/patch-host_hackrf-tools_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- host/hackrf-tools/CMakeLists.txt.orig 2020-10-13 21:46:30 UTC
++++ host/hackrf-tools/CMakeLists.txt
+@@ -33,7 +33,7 @@ include_directories(getopt)
+ add_definitions(/D _CRT_SECURE_NO_WARNINGS)
+ else()
+ add_definitions(-Wall)
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ endif()
+
+ if(NOT libhackrf_SOURCE_DIR)
diff --git a/comms/hackrf-devel/files/patch-host_libhackrf_CMakeLists.txt b/comms/hackrf-devel/files/patch-host_libhackrf_CMakeLists.txt
new file mode 100644
index 000000000000..e5e5e4b3d782
--- /dev/null
+++ b/comms/hackrf-devel/files/patch-host_libhackrf_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- host/libhackrf/CMakeLists.txt.orig 2020-10-13 21:46:30 UTC
++++ host/libhackrf/CMakeLists.txt
+@@ -37,7 +37,7 @@ if(MSVC)
+ set(THREADS_USE_PTHREADS_WIN32 true)
+ else()
+ add_definitions(-Wall)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+
+ INCLUDE(TestBigEndian)
+ TEST_BIG_ENDIAN(BIGENDIAN)
diff --git a/comms/hackrf-devel/pkg-descr b/comms/hackrf-devel/pkg-descr
new file mode 100644
index 000000000000..663b63e82021
--- /dev/null
+++ b/comms/hackrf-devel/pkg-descr
@@ -0,0 +1,7 @@
+HackRF One from Great Scott Gadgets is a Software Defined Radio peripheral
+capable of transmission or reception of radio signals from 10 MHz to 6 GHz.
+Designed to enable test and development of modern and next generation radio
+technologies, HackRF One is an open source hardware platform that can
+be used as a USB peripheral or programmed for stand-alone operation.
+
+WWW: https://greatscottgadgets.com/hackrf/
diff --git a/comms/hackrf-devel/pkg-plist b/comms/hackrf-devel/pkg-plist
new file mode 100644
index 000000000000..8ac0dbe8b73b
--- /dev/null
+++ b/comms/hackrf-devel/pkg-plist
@@ -0,0 +1,14 @@
+bin/hackrf_clock
+bin/hackrf_cpldjtag
+bin/hackrf_debug
+bin/hackrf_info
+bin/hackrf_operacake
+bin/hackrf_spiflash
+bin/hackrf_sweep
+bin/hackrf_transfer
+include/libhackrf/hackrf.h
+lib/libhackrf.a
+lib/libhackrf.so
+lib/libhackrf.so.0
+lib/libhackrf.so.0.5.0
+libdata/pkgconfig/libhackrf.pc