Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2016 22:41:40 +0000 (UTC)
From:      Boris Samorodov <bsam@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r424439 - in head/devel: . libastylej-arduino libastylej-arduino/files
Message-ID:  <201610212241.u9LMfe4W008423@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bsam
Date: Fri Oct 21 22:41:40 2016
New Revision: 424439
URL: https://svnweb.freebsd.org/changeset/ports/424439

Log:
  Fairly straightforward slave port of devel/libastylej that applies
  the Arduino-specific patches to the used JNI functions. Sets PKGNAMESUFFIX
  to get lib/jni/libastyle-arduinoj.so and sets the PATCH{DIR, _WRKSRC}
  variables to use the Arduino patches.
  
  PR:		213632
  Submitted by:	Kyle Evans <bsdports@kyle-evans.net>

Added:
  head/devel/libastylej-arduino/
  head/devel/libastylej-arduino/Makefile   (contents, props changed)
  head/devel/libastylej-arduino/files/
  head/devel/libastylej-arduino/files/patch-src_astyle__main.cpp   (contents, props changed)
  head/devel/libastylej-arduino/files/patch-src_astyle__main.h   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Fri Oct 21 22:29:37 2016	(r424438)
+++ head/devel/Makefile	Fri Oct 21 22:41:40 2016	(r424439)
@@ -1169,6 +1169,7 @@
     SUBDIR += libassetml
     SUBDIR += libast
     SUBDIR += libastylej
+    SUBDIR += libastylej-arduino
     SUBDIR += libatomic_ops
     SUBDIR += libaura
     SUBDIR += libavl

Added: head/devel/libastylej-arduino/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libastylej-arduino/Makefile	Fri Oct 21 22:41:40 2016	(r424439)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+PKGNAMESUFFIX=	-arduino
+MASTERDIR=	${.CURDIR}/../libastylej
+
+PATCHDIR=	${.CURDIR}/files
+PATCH_WRKSRC=	${WRKSRC}/../..
+
+.include "${MASTERDIR}/Makefile"

Added: head/devel/libastylej-arduino/files/patch-src_astyle__main.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libastylej-arduino/files/patch-src_astyle__main.cpp	Fri Oct 21 22:41:40 2016	(r424439)
@@ -0,0 +1,20 @@
+--- src/astyle_main.cpp.orig	2016-10-19 22:42:21 UTC
++++ src/astyle_main.cpp
+@@ -3550,7 +3550,7 @@ using namespace astyle;
+ // called by a java program to get the version number
+ // the function name is constructed from method names in the calling java program
+ extern "C"  EXPORT
+-jstring STDCALL Java_AStyleInterface_AStyleGetVersion(JNIEnv* env, jclass)
++jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleGetVersion(JNIEnv* env, jclass)
+ {
+ 	return env->NewStringUTF(g_version);
+ }
+@@ -3558,7 +3558,7 @@ jstring STDCALL Java_AStyleInterface_ASt
+ // called by a java program to format the source code
+ // the function name is constructed from method names in the calling java program
+ extern "C"  EXPORT
+-jstring STDCALL Java_AStyleInterface_AStyleMain(JNIEnv* env,
++jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleMain(JNIEnv* env,
+                                                 jobject obj,
+                                                 jstring textInJava,
+                                                 jstring optionsJava)

Added: head/devel/libastylej-arduino/files/patch-src_astyle__main.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libastylej-arduino/files/patch-src_astyle__main.h	Fri Oct 21 22:41:40 2016	(r424439)
@@ -0,0 +1,14 @@
+--- src/astyle_main.h.orig	2016-10-19 22:42:25 UTC
++++ src/astyle_main.h
+@@ -422,9 +422,9 @@ void  STDCALL javaErrorHandler(int error
+ char* STDCALL javaMemoryAlloc(unsigned long memoryNeeded);
+ // the following function names are constructed from method names in the calling java program
+ extern "C" EXPORT
+-jstring STDCALL Java_AStyleInterface_AStyleGetVersion(JNIEnv* env, jclass);
++jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleGetVersion(JNIEnv* env, jclass);
+ extern "C" EXPORT
+-jstring STDCALL Java_AStyleInterface_AStyleMain(JNIEnv* env,
++jstring STDCALL Java_cc_arduino_packages_formatter_AStyleInterface_AStyleMain(JNIEnv* env,
+                                                 jobject obj,
+                                                 jstring textInJava,
+                                                 jstring optionsJava);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610212241.u9LMfe4W008423>