summaryrefslogtreecommitdiff
path: root/dev-lang/gdl/files/0.9.2-antlr.patch
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lang/gdl/files/0.9.2-antlr.patch
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lang/gdl/files/0.9.2-antlr.patch')
-rw-r--r--dev-lang/gdl/files/0.9.2-antlr.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/dev-lang/gdl/files/0.9.2-antlr.patch b/dev-lang/gdl/files/0.9.2-antlr.patch
new file mode 100644
index 000000000000..9c8e6abb2358
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-antlr.patch
@@ -0,0 +1,76 @@
+diff -Nur gdl-0.9.2.orig/CMakeLists.txt gdl-0.9.2/CMakeLists.txt
+--- gdl-0.9.2.orig/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt 2011-12-22 20:32:20.000000000 +0000
+@@ -94,6 +94,8 @@
+
+ set(GDL_DATA_DIR "/share/gnudatalanguage" CACHE PATH "Choose data install directory relative to CMAKE_INSTALL_PREFIX")
+
++set(BUNDLED_ANTLR OFF CACHE BOOL "Use bundled ANTLR grammar ?")
++set(ANTLRDIR "" CACHE PATH "Specify the system ANTLR directory tree")
+
+ # check for 64-bit OS
+ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+@@ -143,9 +145,15 @@
+ # mpi
+ check_include_file(mpi.h HAVE_MPI_H)
+
+-# SA: whithout it compilation of antlr fails if there's a conflicting
+-# version of antlr in system-wide directories
+-include_directories(src)
++if(BUNDLED_ANTLR)
++ # SA: whithout it compilation of antlr fails if there's a conflicting
++ # version of antlr in system-wide directories
++ include_directories(src)
++else(BUNDLED_ANTLR)
++ find_package(ANTLR QUIET)
++ set(LIBRARIES ${LIBRARIES} ${ANTLR_LIBRARIES})
++ include_directories(${ANTLR_INCLUDE_DIR})
++endif(BUNDLED_ANTLR)
+
+ # Ncurses MANDATORY
+ # -DNCURSESDIR=DIR
+diff -Nur gdl-0.9.2.orig/CMakeModules/FindANTLR.cmake gdl-0.9.2/CMakeModules/FindANTLR.cmake
+--- gdl-0.9.2.orig/CMakeModules/FindANTLR.cmake 1970-01-01 01:00:00.000000000 +0100
++++ gdl-0.9.2/CMakeModules/FindANTLR.cmake 2011-12-22 21:03:34.000000000 +0000
+@@ -0,0 +1,11 @@
++
++
++find_library(ANTLR_LIBRARIES NAMES antlr)
++find_path(ANTLR_INCLUDE_DIR NAMES antlr/ANTLRUtil.hpp)
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(ANTLR DEFAULT_MSG ANTLR_LIBRARIES ANTLR_INCLUDE_DIR)
++
++mark_as_advanced(
++ANTLR_LIBRARIES
++ANTLR_INCLUDE_DIR
++)
+diff -Nur gdl-0.9.2.orig/src/CMakeLists.txt gdl-0.9.2/src/CMakeLists.txt
+--- gdl-0.9.2.orig/src/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/src/CMakeLists.txt 2011-12-22 20:31:27.000000000 +0000
+@@ -224,9 +224,8 @@
+ widget.cpp
+ )
+
+-add_subdirectory(antlr)
+
+-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_BINARY_DIR})
++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR})
+ link_directories(${LINK_DIRECTORIES})
+
+ if(PYTHON_MODULE) #libgdl
+@@ -237,8 +236,13 @@
+ add_executable(gdl ${SOURCES})
+ endif(PYTHON_MODULE)
+
+-add_dependencies(gdl antlr) # be sure that antlr is built before gdl
+-target_link_libraries(gdl antlr) # link antlr against gdl
++if(BUNDLED_ANTLR)
++ add_subdirectory(antlr)
++ include_directories(${CMAKE_SOURCE_DIR}/src/antlr)
++ add_dependencies(gdl antlr) # be sure that antlr is built before gdl
++ target_link_libraries(gdl antlr) # link antlr against gdl
++endif(BUNDLED_ANTLR)
++
+ target_link_libraries(gdl ${LIBRARIES})
+ add_definitions(-DHAVE_CONFIG_H)
+