Skip to content

Commit eb6301e

Browse files
committed
[GRASS] remove GRASS 6 support
1 parent 7cbf9df commit eb6301e

File tree

154 files changed

+576
-1063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+576
-1063
lines changed

CMakeLists.txt

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,16 @@ SET (WITH_CORE TRUE CACHE BOOL "Determines whether QGIS core should be built.")
3838
MARK_AS_ADVANCED(WITH_CORE)
3939

4040
IF(WITH_CORE)
41-
# try to configure and build GRASS plugin by default
42-
FOREACH (GRASS_SEARCH_VERSION 6 7)
43-
# For GRASS 6 are used cached variables without version suffix so that existing caches don't have to be reconfigured.
44-
# Cached variables: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
41+
# Only GRASS 7 is currently supported but we keep dual version support in cmake for possible future switch to GRASS 8.
42+
# Try to configure and build GRASS plugin by default
43+
FOREACH (GRASS_SEARCH_VERSION 7)
44+
# Legacy note:
45+
# For GRASS 6 there were used cached variables without version suffix so that existing caches didn't have to be reconfigured.
46+
# Cached variables were: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
4547
# Everywhere else each variable has version major appended.
46-
# Normal variables: GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
48+
# Normal variables were: GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
4749
# In addition there is also GRASS_FOUND, which is TRUE if at least one version of GRASS was found
48-
IF (GRASS_SEARCH_VERSION EQUAL 6)
49-
SET (GRASS_CACHE_VERSION "")
50-
ELSE (GRASS_SEARCH_VERSION EQUAL 6)
51-
SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION})
52-
ENDIF (GRASS_SEARCH_VERSION EQUAL 6)
53-
50+
SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION})
5451
SET (WITH_GRASS${GRASS_CACHE_VERSION} TRUE CACHE BOOL "Determines whether GRASS ${GRASS_SEARCH_VERSION} plugin should be built")
5552
IF (WITH_GRASS${GRASS_CACHE_VERSION})
5653
FIND_PACKAGE(GRASS ${GRASS_SEARCH_VERSION})

cmake/FindGRASS.cmake

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ MACRO (CHECK_GRASS G_PREFIX)
137137
SET(GRASS_FOUND TRUE) # GRASS_FOUND is true if at least one version was found
138138
SET(GRASS_PREFIX${GRASS_CACHE_VERSION} ${G_PREFIX})
139139
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
140-
IF(GRASS_FIND_VERSION EQUAL 6)
141-
# Set also normal variable with number
142-
SET(GRASS_INCLUDE_DIR${GRASS_FIND_VERSION} ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}})
143-
SET(GRASS_PREFIX${GRASS_FIND_VERSION} ${G_PREFIX})
144-
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
145-
ENDIF(GRASS_FIND_VERSION EQUAL 6)
146140
ENDIF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
147141
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
148142
ENDIF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h)
@@ -164,20 +158,13 @@ IF (WIN32)
164158
ENDIF (WIN32)
165159

166160
IF (UNIX)
167-
IF (GRASS_FIND_VERSION EQUAL 6)
168-
LIST(APPEND GRASS_PATHS /usr/lib64/grass64 /usr/lib/grass64)
169-
ELSEIF (GRASS_FIND_VERSION EQUAL 7)
161+
IF (GRASS_FIND_VERSION EQUAL 7)
170162
LIST(APPEND GRASS_PATHS /usr/lib64/grass70 /usr/lib/grass70 /usr/lib64/grass71 /usr/lib/grass71 /usr/lib64/grass72 /usr/lib/grass72)
171163
ENDIF ()
172164
ENDIF (UNIX)
173165

174166
IF (APPLE)
175-
IF (GRASS_FIND_VERSION EQUAL 6)
176-
LIST(APPEND GRASS_PATHS
177-
/Applications/GRASS-6.3.app/Contents/MacOS
178-
/Applications/GRASS-6.4.app/Contents/MacOS
179-
)
180-
ELSEIF (GRASS_FIND_VERSION EQUAL 7)
167+
IF (GRASS_FIND_VERSION EQUAL 7)
181168
LIST(APPEND GRASS_PATHS
182169
/Applications/GRASS-7.0.app/Contents/MacOS
183170
/Applications/GRASS-7.1.app/Contents/MacOS

debian/rules

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ ifeq ($(GRASSVER),7)
8585
-DWITH_GRASS=TRUE \
8686
-DWITH_GRASS7=TRUE \
8787
-DGRASS_PREFIX7=/usr/lib/$(GRASS)
88-
else
89-
CMAKE_OPTS += \
90-
-DWITH_GRASS=TRUE \
91-
-DWITH_GRASS6=TRUE \
92-
-DGRASS_PREFIX=/usr/lib/$(GRASS)
9388
endif
9489

9590
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))

ms-windows/osgeo4w/package-nightly.cmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ cmake -G Ninja ^
165165
-D WITH_SERVER=TRUE ^
166166
-D SERVER_SKIP_ECW=TRUE ^
167167
-D WITH_GRASS=TRUE ^
168-
-D WITH_GRASS6=FALSE ^
169168
-D WITH_GRASS7=TRUE ^
170169
-D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^
171170
-D WITH_GLOBE=FALSE ^

ms-windows/osgeo4w/package.cmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ cmake -G Ninja ^
158158
-D WITH_SERVER=TRUE ^
159159
-D SERVER_SKIP_ECW=TRUE ^
160160
-D WITH_GRASS=TRUE ^
161-
-D WITH_GRASS6=FALSE ^
162161
-D WITH_GRASS7=TRUE ^
163162
-D GRASS_PREFIX7=%GRASS72_PATH:\=/% ^
164163
-D WITH_GLOBE=FALSE ^

src/plugins/grass/modules/db.in.ogr.qgm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">
33

44
<qgisgrassmodule label="Import attribute tables in various formats" module="db.in.ogr">
5-
<file key="dsn" type="old" label="Input table" filters="dbf, csv (*.csv *.dbf)" version_max="6.4"/>
6-
<file key="input" type="old" label="Input table" filters="dbf, csv (*.csv *.dbf)" version_min="7.0"/>
5+
<file key="input" type="old" label="Input table" filters="dbf, csv (*.csv *.dbf)"/>
76
<option key="output"/>
87
</qgisgrassmodule>

src/plugins/grass/modules/db.out.ogr.qgm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
<qgisgrassmodule label="Exports attribute tables into various format" module="db.out.ogr">
55
<option key="input" />
6-
<file key="dsn" type="new" version_max="6"/>
7-
<file key="output" type="new" version_min="7"/>
6+
<file key="output" type="new"/>
87
<option key="format" />
9-
<option key="db_table" version_max="6"/>
10-
<option key="table" version_min="7"/>
8+
<option key="table"/>
119
</qgisgrassmodule>

src/plugins/grass/modules/db.select.qgm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
<option key="database" answer="$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/" />
77
<option key="driver" />
88
<option key="sql" />
9-
<option key="fs" answer="|" hidden="yes" version_max="6"/>
10-
<option key="separator" answer="|" hidden="yes" version_min="7"/>
9+
<option key="separator" answer="|" hidden="yes"/>
1110
</qgisgrassmodule>

src/plugins/grass/modules/g.region.multiple.raster.qgm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">
33

44
<qgisgrassmodule label="Set the region to match multiple rasters" module="g.region">
5-
<option key="rast" version_max="6.4"/>
6-
<option key="raster" version_min="7.0"/>
5+
<option key="raster"/>
76
</qgisgrassmodule>

src/plugins/grass/modules/g.region.multiple.vector.qgm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">
33

44
<qgisgrassmodule label="Set the region to match multiple vectors" module="g.region">
5-
<option key="vect" version_max="6.4"/>
6-
<option key="vector" version_min="7.0"/>
5+
<option key="vector"/>
76
</qgisgrassmodule>

0 commit comments

Comments
 (0)