View | Details | Raw Unified | Return to bug 229361
Collapse All | Expand All

(-)b/security/pcsc-cyberjack/Makefile (+38 lines)
Added Link Here
1
# $FreeBSD$
2
3
PORTNAME=	pcsc-cyberjack
4
PORTVERSION=	3.99.5.12
5
DISTVERSION=	3.99.5final.SP12
6
CATEGORIES=	security
7
MASTER_SITES=	http://downloads.reiner-sct.de/LINUX/V3.99.5_SP12/
8
DISTNAME=	pcsc-cyberjack-${DISTVERSION}
9
10
MAINTAINER=	netchild@FreeBSD.org
11
COMMENT=	Reiner SCT cyberJack card reader pcsc driver
12
13
LIB_DEPENDS=	libpcsclite.so:devel/pcsc-lite \
14
		libxml2.so:textproc/libxml2
15
16
LICENSE=	GPLv2 LGPL20
17
LICENSE_COMB=	dual
18
LICENSE_FILE_GPLv2=	${WRKSRC}/COPYRIGHT.GPL
19
LICENSE_FILE_LGPL20=	${WRKSRC}/COPYRIGHT.LGPL
20
21
WRKSRC=		${WRKDIR}/pcsc-cyberjack-${DISTVERSION}
22
23
USES=	gmake libtool tar:bzip2 autoreconf compiler:gcc-c++11-lib
24
25
GNU_CONFIGURE=	yes
26
27
CONFIGURE_ARGS=	--enable-release --with-usbdropdir=${PREFIX}/lib/pcsc/drivers
28
CONFIGURE_ENV=	LIBUSB_CFLAGS="-I${LOCALBASE}/include" \
29
		LIBUSB_LIBS="-L${LOCALBASE}/lib -lusb"
30
CXXFLAGS+=	-Wno-c++11-narrowing
31
CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
32
LDFLAGS+=	${PTHREAD_LIBS}
33
34
PLIST_SUB=	VER=${PORTVERSION}
35
36
MAN8=		cyberjack.8
37
38
.include <bsd.port.mk>
(-)b/security/pcsc-cyberjack/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1530015110
2
SHA256 (pcsc-cyberjack-3.99.5final.SP12.tar.bz2) = 32dc370111119a86ca598154b82b72d8c0a003dd09342a6d2fda14aa96aff312
3
SIZE (pcsc-cyberjack-3.99.5final.SP12.tar.bz2) = 957583
(-)b/security/pcsc-cyberjack/files/patch-Platform_unix.h (+11 lines)
Added Link Here
1
--- include/driver/Platform_unix.h.orig	2013-01-19 22:19:15.826736863 +0100
2
+++ include/driver/Platform_unix.h	2013-01-19 22:20:42.815736285 +0100
3
@@ -39,7 +39,7 @@
4
 #include <ctype.h>
5
 #include <string.h>
6
 
7
-#ifndef OS_DARWIN
8
+#if !defined(OS_DARWIN) && !defined(OS_FREEBSD)
9
 # include <malloc.h>
10
 #endif
11
 
(-)b/security/pcsc-cyberjack/files/patch-cm_distri.cpp (+24 lines)
Added Link Here
1
--- libcyberjack/checksuite/cm_distri.cpp.orig	2018-06-26 14:29:27.056505000 +0200
2
+++ libcyberjack/checksuite/cm_distri.cpp	2018-06-26 14:30:14.869438000 +0200
3
@@ -10,8 +10,9 @@
4
  ***************************************************************************/
5
 
6
 
7
+#include "config.h"
8
+#include "Platform.h"
9
 
10
-
11
 #include "cm_distri.h"
12
 #include "checksuite.h"
13
 
14
@@ -21,6 +22,10 @@
15
 #include <string.h>
16
 #include <unistd.h>
17
 
18
+#ifdef OS_FREEBSD
19
+#include <sys/types.h>
20
+#include <sys/wait.h>
21
+#endif
22
 
23
 
24
 bool CM_Distri::check(std::string &xmlString,
(-)b/security/pcsc-cyberjack/files/patch-configure.ac (+10 lines)
Added Link Here
1
--- configure.ac.orig	2018-06-26 15:26:28.648441000 +0200
2
+++ configure.ac	2018-06-26 15:26:51.565030000 +0200
3
@@ -219,6 +219,7 @@
4
 AM_CONDITIONAL(IS_WINDOWS, [test "$OS_TYPE" = "windows"])
5
 AM_CONDITIONAL(IS_OSX, [test "$OSYSTEM" = "osx"])
6
 AM_CONDITIONAL(IS_LINUX, [test "$OSYSTEM" = "linux"])
7
+AM_CONDITIONAL(IS_FREEBSD, [test "$OSYSTEM" = "freebsd"])
8
 
9
 AC_SUBST(cyberjack_sys_is_windows)
10
 AC_SUBST(cyberjack_config_file)
(-)b/security/pcsc-cyberjack/files/patch-dialog.c (+87 lines)
Added Link Here
1
--- libcyberjack/libdialog/dialog.c.orig	2011-11-11 08:13:13.000000000 +0100
2
+++ libcyberjack/libdialog/dialog.c	2013-01-19 23:05:27.659736536 +0100
3
@@ -22,7 +22,7 @@
4
  *                                                                         *
5
  ***************************************************************************/
6
 
7
-
8
+#include "config.h"
9
 #include "Platform.h"
10
 #include "dialog_p.h"
11
 #include "network.h"
12
@@ -30,7 +30,11 @@
13
 #include <sys/types.h>
14
 #include <sys/stat.h>
15
 #include <pwd.h>
16
+#ifdef OS_FREEBSD
17
+#include <utmpx.h>
18
+#else
19
 #include <utmp.h>
20
+#endif
21
 
22
 #include <errno.h>
23
 #include <string.h>
24
@@ -120,11 +124,19 @@
25
 
26
 static int rsct_dialog_mk_socket() {
27
   char buffer[256];
28
+#ifdef OS_FREEBSD
29
+  struct utmpx *u_tmp_p;
30
+#else
31
   struct utmp *u_tmp_p;
32
+#endif
33
   struct passwd *pw;
34
   int sk;
35
 
36
+#ifdef OS_FREEBSD
37
+  while ((u_tmp_p = getutxent()) != NULL) {
38
+#else
39
   while ((u_tmp_p = getutent()) != NULL) {
40
+#endif
41
     DEBUGPI("RSCT: ut_type=%d, ut_line=[%s]\n",
42
 	    u_tmp_p->ut_type,
43
 	    u_tmp_p->ut_line);
44
@@ -136,7 +148,11 @@
45
 
46
   if (u_tmp_p==NULL) {
47
     DEBUGPE("RSCT: No user logged in at XServer :0 (%s (%d))\n", strerror(errno), errno);
48
+#ifdef OS_FREEBSD
49
+    endutxent();
50
+#else
51
     endutent();
52
+#endif
53
     return -1;
54
   }
55
 
56
@@ -144,18 +160,31 @@
57
   if (pw==NULL) {
58
     DEBUGPE("RSCT: Could not get home folder for user [%s]: %s (%d)\n",
59
 	    u_tmp_p->ut_user, strerror(errno), errno);
60
+#ifdef OS_FREEBSD
61
+    endutxent();
62
+#else
63
     endutent();
64
+#endif
65
     return -1;
66
   }
67
 
68
   if (pw->pw_dir==NULL || *(pw->pw_dir)==0) {
69
     DEBUGPE("RSCT: User [%s] has no home folder\n", u_tmp_p->ut_user);
70
+#ifdef OS_FREEBSD
71
+    endutxent();
72
+#else
73
     endutent();
74
+#endif
75
     return -1;
76
   }
77
   strncpy(buffer, pw->pw_dir, sizeof(buffer)-1);
78
   strncat(buffer, "/.cyberJack_gui_sock", sizeof(buffer)-1);
79
+#ifdef OS_FREEBSD
80
+  endutxent();
81
+#else
82
   endutent();
83
+#endif
84
+
85
 
86
   sk=rsct_net_connect_by_path(buffer);
87
   if (sk==-1) {
(-)b/security/pcsc-cyberjack/files/patch-ifd-Makefile.am (+14 lines)
Added Link Here
1
--- ifd/Makefile.am.orig	2018-06-26 15:11:01.895689000 +0200
2
+++ ifd/Makefile.am	2018-06-26 15:11:49.437588000 +0200
3
@@ -23,6 +23,11 @@
4
 bundleosx_LTLIBRARIES=libifd-cyberjack.la
5
 endif
6
 
7
+if IS_FREEBSD
8
+bundlefreebsddir=$(usbdropdir)/libifd-cyberjack.bundle/Contents/FreeBSD
9
+bundlefreebsd_LTLIBRARIES=libifd-cyberjack.la
10
+endif
11
+
12
 libifd_cyberjack_la_SOURCES=ifd.cpp
13
 libifd_cyberjack_la_LDFLAGS=-version-info @CYBERJACK_SO_CURRENT@:@CYBERJACK_SO_REVISION@:@CYBERJACK_SO_AGE@ -no-undefined
14
 #libifd_cyberjack_la_LIBADD=$(top_builddir)/cjeca32/libeca.la $(top_builddir)/cjeca32/ausb/libausb.la
(-)b/security/pcsc-cyberjack/files/patch-os_freebsd (+41 lines)
Added Link Here
1
--- cjeca32/Debug.cpp.orig	2013-01-19 22:30:58.983736881 +0100
2
+++ cjeca32/Debug.cpp	2013-01-19 22:35:24.457770463 +0100
3
@@ -139,7 +139,7 @@
4
 
5
 
6
 
7
-#elif defined(OS_LINUX) || defined(OS_DARWIN)
8
+#elif defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_FREEBSD)
9
 
10
 #if defined(OS_DARWIN)
11
 # define DEBUG_DEFAULT_LOGFILE "/Library/Logs/cj.log"
12
--- cjeca32/RSCTCriticalSection.cpp.orig	2013-01-19 22:30:58.986736570 +0100
13
+++ cjeca32/RSCTCriticalSection.cpp	2013-01-19 22:33:42.206737418 +0100
14
@@ -22,7 +22,7 @@
15
 	LeaveCriticalSection(&m_hCritSec);
16
 }
17
 
18
-#elif defined(OS_LINUX)
19
+#elif defined(OS_LINUX) || defined(OS_FREEBSD)
20
 
21
 CRSCTCriticalSection::CRSCTCriticalSection(void){
22
 }
23
--- include/driver/Debug.h.orig	2013-01-19 22:30:58.992736009 +0100
24
+++ include/driver/Debug.h	2013-01-19 22:35:43.141747628 +0100
25
@@ -42,14 +42,14 @@
26
 public:
27
 	~CDebug(void);
28
 
29
-#if defined(OS_LINUX) || defined(OS_DARWIN)
30
+#if defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_FREEBSD)
31
 	void setLevelMask(unsigned int nLevelMask);
32
 	void setLogFileName(const char *fname);
33
 #endif
34
 	
35
 private:
36
    unsigned int m_nLevelMask;
37
-#if defined(OS_LINUX) || defined(OS_DARWIN)
38
+#if defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_FREEBSD)
39
        char *m_logFileName;
40
 #endif
41
 };
(-)b/security/pcsc-cyberjack/pkg-descr (+1 lines)
Added Link Here
1
pcsc-lite driver for the Reiner SCT cyberJack card readers
(-)b/security/pcsc-cyberjack/pkg-plist (+6 lines)
Added Link Here
1
lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/FreeBSD/libifd-cyberjack.a
2
lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/FreeBSD/libifd-cyberjack.so
3
lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/FreeBSD/libifd-cyberjack.so.6
4
lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/FreeBSD/libifd-cyberjack.so.6.0.0
5
lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Info.plist
6
lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/PkgInfo

Return to bug 229361