[149926] trunk/dports/science/gr-fosphor

michaelld at macports.org michaelld at macports.org
Tue Jul 5 14:49:45 PDT 2016


Revision: 149926
          https://trac.macports.org/changeset/149926
Author:   michaelld at macports.org
Date:     2016-07-05 14:49:45 -0700 (Tue, 05 Jul 2016)
Log Message:
-----------
gr-fosphor:
+ update to 7b6b9961 (20160522);
+ remove integrated and superseded patches;
+ add in temporary patch to fix integration with gr_log.

Modified Paths:
--------------
    trunk/dports/science/gr-fosphor/Portfile

Added Paths:
-----------
    trunk/dports/science/gr-fosphor/files/patch-add_gr_log.diff

Removed Paths:
-------------
    trunk/dports/science/gr-fosphor/files/patch-add-png.diff
    trunk/dports/science/gr-fosphor/files/patch-add_find_libpng.diff
    trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindFreetype2.cmake.diff
    trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindGLFW3.cmake.diff

Modified: trunk/dports/science/gr-fosphor/Portfile
===================================================================
--- trunk/dports/science/gr-fosphor/Portfile	2016-07-05 21:43:56 UTC (rev 149925)
+++ trunk/dports/science/gr-fosphor/Portfile	2016-07-05 21:49:45 UTC (rev 149926)
@@ -22,11 +22,10 @@
 long_description    ${description}  \
     This port is kept up with the gr-fosphor GIT 'master' branch, which is typically updated weekly to monthly, providing compatibility with GNU Radio release 3.7 API: the gnuradio and gnuradio-devel ports.
 
-set commit          e1eb11b2d8bd0270950d76710017957597929397
-version             20160125
-revision            1
-checksums           rmd160 175e4b0af5323c9aecc08b7542e3045b301d8afd \
-                    sha256 c376062efec4a23b00aa4566c044e63e252cd98291b394f911ee3ef54e9dbffd
+set commit          7b6b9961bc2d9b84daeb42a5c8f8aeba293d207c
+version             20160522
+checksums           rmd160 4cd157163ee82596d0d87dd1626239491e0e17ce \
+                    sha256 a848e5423d4e50dab363bd8ddf14143641ee814828cb549f581475e1ec507a94
 
 distname            ${name}-${commit}
 master_sites        http://cgit.osmocom.org/gr-fosphor/snapshot/
@@ -38,7 +37,7 @@
     path:lib/libglfw.dylib:glfw \
     port:swig-python \
     port:${wxWidgets.port} \
-    port:libpng
+    port:log4cpp
 
 depends_build-append \
     port:doxygen
@@ -47,22 +46,10 @@
 
 cmake.out_of_source yes
 
-# temporary patch to fix finding Freetype2 headers
+# temporary patch to fix using gr_log
 
-patchfiles-append patch-cmake_Modules_FindFreetype2.cmake.diff
+patchfiles-append patch-add_gr_log.diff
 
-# temporary patch to add finding libpng
-
-patchfiles-append patch-add_find_libpng.diff
-
-# temporary patch to fix finding GLFW3
-
-patchfiles-append patch-cmake_Modules_FindGLFW3.cmake.diff
-
-# temporary patch to add back in the PNG stuff
-
-patchfiles-append patch-add-png.diff
-
 # remove top-level library path, such that internal libraries are used
 # instead of any already-installed ones.
 

Deleted: trunk/dports/science/gr-fosphor/files/patch-add-png.diff
===================================================================
--- trunk/dports/science/gr-fosphor/files/patch-add-png.diff	2016-07-05 21:43:56 UTC (rev 149925)
+++ trunk/dports/science/gr-fosphor/files/patch-add-png.diff	2016-07-05 21:49:45 UTC (rev 149926)
@@ -1,139 +0,0 @@
---- lib/fosphor/Makefile.orig
-+++ lib/fosphor/Makefile
-@@ -1,7 +1,7 @@
- UNAME=$(shell uname)
- CC=gcc
--CFLAGS=-Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g
--LDLIBS=`pkg-config freetype2 glfw3 --libs` -lm
-+CFLAGS=-Wall -Werror -O2 `pkg-config freetype2 glfw3 libpng --cflags` -g
-+LDLIBS=`pkg-config freetype2 glfw3 libpng --libs` -lm
- ifneq ($(AMDAPPSDKROOT), )
- CFLAGS+=-I$(AMDAPPSDKROOT)/include
- endif
---- lib/fosphor/gl_cmap_gen.c.orig
-+++ lib/fosphor/gl_cmap_gen.c
-@@ -27,10 +27,16 @@
-  *  \brief OpenGL color map generators
-  */
- 
-+#include <errno.h>
- #include <stdint.h>
-+#include <stdlib.h>
-+#include <string.h>
- #include <math.h>
- 
-+#include <png.h>
-+
- #include "gl_cmap_gen.h"
-+#include "resource.h"
- 
- 
- static void
-@@ -128,6 +134,33 @@ _set_rgba_from_hsv(uint32_t *rgba, float h, float s, float v)
- }
- 
- 
-+static uint32_t
-+_rgba_interpolate(uint32_t *rgba, int sz, int p, int N)
-+{
-+	int pos_i = (p * (sz-1)) / (N-1);
-+	int pos_f = (p * (sz-1)) - (pos_i * (N-1));
-+	uint32_t vl, vh, vf = 0;
-+	int i;
-+
-+	if (pos_f == 0)
-+		return rgba[pos_i];
-+
-+	vl = rgba[pos_i];
-+	vh = rgba[pos_i+1];
-+
-+	for (i=0; i<4; i++)
-+	{
-+		uint32_t nv =
-+			((vl >> (8 * i)) & 0xff) * ((N-1) - pos_f) +
-+			((vh >> (8 * i)) & 0xff) * pos_f;
-+
-+		vf |= ((nv / (N-1)) & 0xff) << (8 * i);
-+	}
-+
-+	return vf;
-+}
-+
-+
- int
- fosphor_gl_cmap_histogram(uint32_t *rgba, int N, void *arg)
- {
-@@ -179,4 +212,63 @@ fosphor_gl_cmap_waterfall(uint32_t *rgba, int N, void *arg)
- 	return 0;
- }
- 
-+int
-+fosphor_gl_cmap_png(uint32_t *rgba, int N, void *arg)
-+{
-+	const char *rsrc_name = arg;
-+	png_image img;
-+	const void *png_data = NULL;
-+	void *png_rgba = NULL;
-+	int png_len, i, rv;
-+
-+	/* Grab the file */
-+	png_data = resource_get(rsrc_name, &png_len);
-+	if (!png_data)
-+		return -ENOENT;
-+
-+	/* Read PNG */
-+	memset(&img, 0x00, sizeof(img));
-+	img.version = PNG_IMAGE_VERSION;
-+
-+	rv = png_image_begin_read_from_memory(&img, png_data, png_len);
-+	if (!rv) {
-+		rv = -EINVAL;
-+		goto error;
-+	}
-+
-+	img.format = PNG_FORMAT_RGBA;
-+
-+	png_rgba = malloc(sizeof(uint32_t) * img.width * img.height);
-+	if (!png_rgba) {
-+		rv = -ENOMEM;
-+		goto error;
-+	}
-+
-+	rv = png_image_finish_read(&img,
-+		NULL,				/* background */
-+		png_rgba,			/* buffer */
-+		sizeof(uint32_t) * img.width,	/* row_stride */
-+		NULL				/* colormap */
-+	);
-+	if (!rv) {
-+		rv = -EINVAL;
-+		goto error;
-+	}
-+
-+	/* Interpolate the PNG to the requested linear scale */
-+	for (i=0; i<N; i++)
-+		rgba[i] = _rgba_interpolate(png_rgba, img.width, i, N);
-+
-+	/* Done */
-+	rv = 0;
-+
-+error:
-+	free(png_rgba);
-+
-+	if (png_data)
-+		resource_put(png_data);
-+
-+	return rv;
-+}
-+
- /*! @} */
---- lib/fosphor/gl_cmap_gen.h.orig
-+++ lib/fosphor/gl_cmap_gen.h
-@@ -34,6 +34,7 @@
- 
- int fosphor_gl_cmap_histogram(uint32_t *rgba, int N, void *arg);
- int fosphor_gl_cmap_waterfall(uint32_t *rgba, int N, void *arg);
-+int fosphor_gl_cmap_png(uint32_t *rgba, int N, void *rsrc_name);
- 
- /*! @} */
- 

Deleted: trunk/dports/science/gr-fosphor/files/patch-add_find_libpng.diff
===================================================================
--- trunk/dports/science/gr-fosphor/files/patch-add_find_libpng.diff	2016-07-05 21:43:56 UTC (rev 149925)
+++ trunk/dports/science/gr-fosphor/files/patch-add_find_libpng.diff	2016-07-05 21:49:45 UTC (rev 149926)
@@ -1,68 +0,0 @@
---- CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -109,6 +109,11 @@ if(NOT FREETYPE2_FOUND)
- 	message(FATAL_ERROR "freetype2 required to compile gr-fosphor")
- endif()
- 
-+find_package(libpng)
-+if(NOT LIBPNG_FOUND)
-+	message(FATAL_ERROR "libpng required to compile gr-fosphor")
-+endif()
-+
- # Optional
- find_package(GLFW3)
- 
---- lib/CMakeLists.txt.orig
-+++ lib/CMakeLists.txt
-@@ -39,12 +39,14 @@ include_directories(
- 	${OPENGL_INCLUDE_DIRS}
- 	${OpenCL_INCLUDE_DIRS}
- 	${FREETYPE2_INCLUDE_DIRS}
-+	${LIBPNG_INCLUDE_DIRS}
- 	${Boost_INCLUDE_DIR}
- )
- link_directories(
- 	${OPENGL_LIBRARY_DIRS}
- 	${OpenCL_LIBRARY_DIRS}
- 	${FREETYPE2_LIBRARY_DIRS}
-+	${LIBPNG_LIBRARY_DIRS}
- 	${Boost_LIBRARY_DIRS}
- )
- 
-@@ -86,6 +88,7 @@ list(APPEND fosphor_libraries
- 	${OPENGL_LIBRARIES}
- 	${OpenCL_LIBRARIES}
- 	${FREETYPE2_LIBRARIES}
-+	${LIBPNG_LIBRARIES}
- 	${Boost_LIBRARIES}
- 	${GNURADIO_ALL_LIBRARIES}
- 	${CMAKE_DL_LIBS}
---- /dev/null
-+++ cmake/Modules/Findlibpng.cmake
-@@ -0,0 +1,26 @@
-+if(NOT LIBPNG_FOUND)
-+  INCLUDE(FindPkgConfig)
-+  pkg_check_modules(LIBPNG_PKG libpng)
-+  find_path(LIBPNG_INCLUDE_DIRS
-+    NAMES png.h
-+    HINTS ${LIBPNG_PKG_INCLUDE_DIRS}
-+    NO_DEFAULT_PATH
-+  )
-+
-+  find_library(LIBPNG_LIBRARIES
-+    NAMES ${LIBPNG_PKG_LIBRARIES} png
-+    HINTS ${LIBPNG_PKG_LIBRARY_DIRS}
-+    NO_DEFAULT_PATH
-+  )
-+
-+  if(LIBPNG_INCLUDE_DIRS AND LIBPNG_LIBRARIES)
-+    set(LIBPNG_FOUND TRUE CACHE INTERNAL "LIBPNG found")
-+    message(STATUS "Found LIBPNG: ${LIBPNG_INCLUDE_DIRS}, ${LIBPNG_LIBRARIES}")
-+  else(LIBPNG_INCLUDE_DIRS AND LIBPNG_LIBRARIES)
-+    set(LIBPNG_FOUND FALSE CACHE INTERNAL "LIBPNG found")
-+    message(STATUS "LIBPNG not found.")
-+  endif(LIBPNG_INCLUDE_DIRS AND LIBPNG_LIBRARIES)
-+
-+  mark_as_advanced(LIBPNG_INCLUDE_DIRS LIBPNG_LIBRARIES)
-+
-+endif(NOT LIBPNG_FOUND)

Added: trunk/dports/science/gr-fosphor/files/patch-add_gr_log.diff
===================================================================
--- trunk/dports/science/gr-fosphor/files/patch-add_gr_log.diff	                        (rev 0)
+++ trunk/dports/science/gr-fosphor/files/patch-add_gr_log.diff	2016-07-05 21:49:45 UTC (rev 149926)
@@ -0,0 +1,44 @@
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -134,6 +134,19 @@ find_package(PythonLibs 2)
+ 
+ find_package(SWIG)
+ 
++# Handle gr_log enable/disable
++include(GrMiscUtils)
++GR_LOGGING()
++# use gr_log iff enabled and log4cpp found
++if(ENABLE_GR_LOG AND HAVE_LOG4CPP)
++  set(ENABLE_LOGGING True CACHE INTERNAL "" FORCE)
++else()
++  # when disabled, set all log variables to false, just in case
++  set(HAVE_GR_LOG False CACHE INTERNAL "" FORCE)
++  set(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE)
++  set(ENABLE_LOGGING False CACHE INTERNAL "" FORCE)
++endif()
++
+ ########################################################################
+ # Setup the components
+ ########################################################################
+--- lib/CMakeLists.txt.orig
++++ lib/CMakeLists.txt
+@@ -70,6 +70,11 @@ if(ENABLE_QT)
+     include_directories(${QT_INCLUDE_DIRS})
+ endif(ENABLE_QT)
+ 
++if(ENABLE_LOGGING)
++    include_directories(${LOG4CPP_INCLUDE_DIRS})
++    link_directories(${LOG4CPP_LIBRARY_DIRS})
++endif(ENABLE_LOGGING)
++
+ list(APPEND fosphor_sources
+ 	fosphor/axis.c
+ 	fosphor/cl.c
+@@ -101,6 +106,7 @@ list(APPEND fosphor_libraries
+ list_cond_append(ENABLE_PYTHON fosphor_libraries ${PYTHON_LIBRARY})
+ list_cond_append(ENABLE_GLFW fosphor_libraries ${GLFW3_LIBRARIES})
+ list_cond_append(ENABLE_QT   fosphor_libraries ${QT_LIBRARIES})
++list_cond_append(ENABLE_LOGGING fosphor_libraries ${LOG4CPP_LIBRARIES})
+ 
+ add_library(gnuradio-fosphor SHARED ${fosphor_sources})
+ target_link_libraries(gnuradio-fosphor ${fosphor_libraries})

Deleted: trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindFreetype2.cmake.diff
===================================================================
--- trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindFreetype2.cmake.diff	2016-07-05 21:43:56 UTC (rev 149925)
+++ trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindFreetype2.cmake.diff	2016-07-05 21:49:45 UTC (rev 149926)
@@ -1,64 +0,0 @@
---- cmake/Modules/FindFreetype2.cmake.orig	2015-10-11 11:10:32.000000000 -0400
-+++ cmake/Modules/FindFreetype2.cmake	2015-10-11 11:10:34.000000000 -0400
-@@ -23,47 +23,18 @@
- 
-   if(FREETYPE2_INCLUDE_DIR_ft2build)
- 
--    # Freetype changed header locations between API release 16 and 17;
--    # look for config/ftheader.h depending on the API release number.
--
--    if(NOT FREETYPE2_PKG_VERSION)
--
--      # PKGCONFIG failed to find a package, but ft2build.h was
--      # located.  Guess API release version based on trailing
--      # directory of ft2build.h location.
--
--      STRING(REGEX MATCH "[^/]*$" FREETYPE2_ft2build_DIR ${FREETYPE2_INCLUDE_DIR_ft2build})
--      message("FREETYPE2_ft2build_DIR is '${FREETYPE2_ft2build_DIR}'")
--      STRING(COMPARE NOTEQUAL ${FREETYPE2_ft2build_DIR} "freetype2" FREETYPE_IS_2_4_OR_EARLIER)
--
--    else(NOT FREETYPE2_PKG_VERSION)
--
--      # PKGCONFIG provides version information; use that
--
--      STRING(REGEX MATCH "[^.]*" FREETYPE2_RELEASE ${FREETYPE2_PKG_VERSION})
--      STRING(COMPARE LESS ${FREETYPE2_RELEASE} 17 FREETYPE_IS_2_4_OR_EARLIER)
--
--    endif(NOT FREETYPE2_PKG_VERSION)
--
--    if(FREETYPE_IS_2_4_OR_EARLIER)
--      # freetype 2.4 or earlier
--      set(FTHEADER_NAME freetype/config/ftheader.h)
--    else(FREETYPE_IS_2_4_OR_EARLIER)
--      # freetype 2.5 or later
--      set(FTHEADER_NAME config/ftheader.h)
--    endif(FREETYPE_IS_2_4_OR_EARLIER)
-+    # find config/ftheader.h; this could be in the top-level freetype2
-+    # include directory or in the freetype subdirectory, depending on
-+    # the version of freetype2.
- 
-     find_path(FREETYPE2_INCLUDE_DIR_ftheader
-       NAMES
--      ${FTHEADER_NAME}
-+      config/ftheader.h
-       HINTS
--      ${FREETYPE2_PKG_INCLUDE_DIRS}
-       ${FREETYPE2_INCLUDE_DIR_ft2build}
-       ENV FREETYPE2_DIR
-       PATH_SUFFIXES
--      freetype2
--      include/freetype2
--      include
-+      freetype
-       NO_DEFAULT_PATH
-     )
- 
-@@ -93,7 +64,7 @@
-       if(FREETYPE2_LIBRARIES)
-         set(FREETYPE2_FOUND TRUE CACHE INTERNAL "freetype2 found")
-         message(STATUS "Found freetype2: ${FREETYPE2_INCLUDE_DIRS}, ${FREETYPE2_LIBRARIES}")
--      else(FREETYPE2_INCLUDE_DIRS AND FREETYPE2_LIBRARIES)
-+      else()
-         set(FREETYPE2_FOUND FALSE CACHE INTERNAL "freetype2 found")
-         message(STATUS "freetype2 not found.")
-       endif(FREETYPE2_LIBRARIES)

Deleted: trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindGLFW3.cmake.diff
===================================================================
--- trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindGLFW3.cmake.diff	2016-07-05 21:43:56 UTC (rev 149925)
+++ trunk/dports/science/gr-fosphor/files/patch-cmake_Modules_FindGLFW3.cmake.diff	2016-07-05 21:49:45 UTC (rev 149926)
@@ -1,28 +0,0 @@
---- cmake/Modules/FindGLFW3.cmake.orig
-+++ cmake/Modules/FindGLFW3.cmake
-@@ -1,18 +1,16 @@
- if(NOT GLFW3_FOUND)
-   INCLUDE(FindPkgConfig)
--  pkg_check_modules (GLFW3_PKG glfw3)
--  find_path(GLFW3_INCLUDE_DIRS NAMES GLFW/glfw3.h
-+  pkg_check_modules(GLFW3_PKG glfw3)
-+  find_path(GLFW3_INCLUDE_DIRS
-+    NAMES GLFW/glfw3.h
-     HINTS ${GLFW3_PKG_INCLUDE_DIRS}
--    PATHS
--    /usr/include
--    /usr/local/include
-+    NO_DEFAULT_PATH
-   )
- 
--  find_library(GLFW3_LIBRARIES NAMES glfw3 glfw
-+  find_library(GLFW3_LIBRARIES
-+    NAMES ${GLFW3_PKG_LIBRARIES} glfw3 glfw
-     HINTS ${GLFW3_PKG_LIBRARY_DIRS}
--    PATHS
--    /usr/lib
--    /usr/local/lib
-+    NO_DEFAULT_PATH
-   )
- 
-   if(GLFW3_INCLUDE_DIRS AND GLFW3_LIBRARIES)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160705/c979acbd/attachment-0001.html>


More information about the macports-changes mailing list