Created
November 22, 2013 03:21
-
-
Save ricochet1k/7594266 to your computer and use it in GitHub Desktop.
ArchLinux cgminer-git and cgminer-git-rpi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- PKGBUILD.old 2013-09-05 03:08:26.000000000 -0600 | |
+++ PKGBUILD 2013-11-21 20:19:58.522903022 -0700 | |
@@ -13,7 +13,7 @@ | |
provides=('cgminer') | |
_gitname=cgminer | |
epoch=1 | |
-pkgver=4900.9282054 | |
+pkgver=5761.9ce30b7 | |
pkgver() { | |
cd "$srcdir/$_gitname" | |
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) | |
@@ -31,9 +31,11 @@ | |
'opencl-nvidia: OpenCL implementation for NVIDIA' | |
'opencl-catalyst: OpenCL implementation for AMD') | |
source=("git+https://github.com/ckolivas/cgminer.git" | |
+ "system-jansson-libusb.patch" | |
"$_gitname.conf.d::https://projects.archlinux.org/svntogit/community.git/plain/trunk/cgminer.conf.d?h=packages/cgminer" | |
"$_gitname.service::https://projects.archlinux.org/svntogit/community.git/plain/trunk/cgminer.service?h=packages/cgminer") | |
sha512sums=('SKIP' | |
+ '9083fd18b64f5d1260d2be1d564e8bf9435b2753a621ffc87b56c40fb30030477619d3a17e29c241a2c951c1ee7e4bf3091135fd0be0b1963e19f79c01d33006' | |
'99c38bc395848f9712ce172343d31f5c60f5d8ac1cfe2f48df8f3ec6c488fc275763a79c5ef36b99f32faa465b5a65284b38e8a63ef9b144075ee13971313b41' | |
'3317b60c6b1f14c47d8ee636113ef40a4023ab14054129de80a37947b381fd2b647a7053f4e1bb639efa225a514e862fa531908714c34040dda2d6221dde7f5f') | |
@@ -43,21 +45,12 @@ | |
build() { | |
cd "$srcdir/$_gitname" | |
- ./autogen.sh | |
- | |
# We have latest jansson and libusb - just use them | |
- sed "s|ac_subdirs_all='compat/libusb\-1.0'||" -i ./configure | |
- sed 's|subdirs="$subdirs compat/libusb\-1.0"||' -i ./configure | |
- sed 's|LIBUSB_LIBS="compat/libusb-1.0/libusb/.libs/libusb-1.0.a"|LIBUSB_LIBS=-lusb-1.0|' -i ./configure | |
- sed 's|JANSSON_LIBS="compat/jansson/libjansson.a"|JANSSON_LIBS=-ljansson|' -i ./configure | |
- sed 's|compat/Makefile compat/jansson/Makefile||' -i ./configure | |
- | |
- sed 's|JANSSON_INCLUDES = -I$(top_srcdir)/compat/jansson||' -i ./Makefile.in | |
- sed 's|USBUTILS_INCLUDES = -I$(top_srcdir)/compat/libusb\-1.0/libusb|USBUTILS_INCLUDES = -I/usr/include/libusb-1.0|' -i ./Makefile.in | |
- sed 's|SUBDIRS = lib compat ccan|SUBDIRS = lib ccan|' -i ./Makefile.in | |
- | |
+ patch -Np1 -i ../system-jansson-libusb.patch | |
rm -r compat | |
+ NOCONFIGURE=1 ./autogen.sh | |
+ | |
# Here you may want to use custom CFLAGS | |
#export CFLAGS="-O2 -march=native -mtune=native -msse2" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile.am b/Makefile.am | |
index 05002bc..407c301 100644 | |
--- a/Makefile.am | |
+++ b/Makefile.am | |
@@ -1,10 +1,10 @@ | |
ACLOCAL_AMFLAGS = -I m4 | |
-JANSSON_INCLUDES= -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/src | |
+JANSSON_INCLUDES= | |
if WANT_USBUTILS | |
-USBUTILS_INCLUDES = -I$(top_builddir)/compat/libusb-1.0/libusb -I$(top_srcdir)/compat/libusb-1.0/libusb | |
+USBUTILS_INCLUDES = -I/usr/include/libusb-1.0 | |
else | |
USBUTILS_INCLUDES = | |
endif | |
@@ -16,7 +16,7 @@ EXTRA_DIST = example.conf linux-usb-cgminer \ | |
bitforce-firmware-flash.c hexdump.c ASIC-README \ | |
01-cgminer.rules | |
-SUBDIRS = lib compat ccan | |
+SUBDIRS = lib ccan | |
INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES) $(USBUTILS_INCLUDES) | |
diff --git a/configure.ac b/configure.ac | |
index 6553d23..f1bde1b 100644 | |
--- a/configure.ac | |
+++ b/configure.ac | |
@@ -273,14 +273,8 @@ AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue]) | |
AM_CONDITIONAL([HAVE_x86_64], [test x$have_x86_64 = xtrue]) | |
if test "x$want_usbutils" != xfalse; then | |
- dlibusb="no" | |
AC_DEFINE([USE_USBUTILS], [1], [Defined to 1 if usbutils support required]) | |
- AC_ARG_WITH([system-libusb], | |
- [AC_HELP_STRING([--with-system-libusb],[Compile against dynamic system libusb (default use included static libusb)])], | |
- [dlibusb=$withval] | |
- ) | |
- if test "x$dlibusb" != xno; then | |
case $target in | |
*-*-freebsd*) | |
LIBUSB_LIBS="-lusb" | |
@@ -291,25 +285,13 @@ if test "x$want_usbutils" != xfalse; then | |
PKG_CHECK_MODULES(LIBUSB, libusb-1.0, [AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb-1.0])], [AC_MSG_ERROR([Could not find usb library - please install libusb-1.0])]) | |
;; | |
esac | |
- else | |
- AC_CONFIG_SUBDIRS([compat/libusb-1.0]) | |
- LIBUSB_LIBS="compat/libusb-1.0/libusb/.libs/libusb-1.0.a" | |
- if test "x$have_linux" = "xtrue"; then | |
- LIBUSB_LIBS+=" -ludev" | |
- fi | |
- if test "x$have_darwin" = "xtrue"; then | |
- LIBUSB_LIBS+=" -lobjc" | |
- LDFLAGS+=" -framework CoreFoundation -framework IOKit" | |
- fi | |
- fi | |
else | |
LIBUSB_LIBS="" | |
fi | |
AM_CONDITIONAL([WANT_STATIC_LIBUSB], [test x$dlibusb = xno]) | |
-AC_CONFIG_SUBDIRS([compat/jansson-2.5]) | |
-JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a" | |
+JANSSON_LIBS=-ljansson | |
PKG_PROG_PKG_CONFIG() | |
@@ -413,7 +395,6 @@ AC_SUBST(ADL_CPPFLAGS) | |
AC_CONFIG_FILES([ | |
Makefile | |
- compat/Makefile | |
ccan/Makefile | |
lib/Makefile | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment