summaryrefslogtreecommitdiff
path: root/debian/patches/icedtea-pretend-memory.diff
blob: 9b6bbf01bbf1763367ec1c7702df36e7727e06aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- openjdk/jdk/make/common/shared/Platform.gmk
+++ openjdk/jdk/make/common/shared/Platform.gmk
@@ -230,7 +230,7 @@
   # Suffix for file bundles used in previous release
   BUNDLE_FILE_SUFFIX=.tar.gz
   # How much RAM does this machine have:
-  MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
+  MB_OF_MEMORY := $(shell m=`free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2`; if [ "$$m" -lt 384 ]; then echo 384; else echo $$m; fi)
 endif
 
 ifeq ($(SYSTEM_UNAME), Darwin)
--- openjdk/corba/make/common/shared/Platform.gmk
+++ openjdk/corba/make/common/shared/Platform.gmk
@@ -237,7 +237,7 @@
     endif
   endif
   # How much RAM does this machine have:
-  MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
+  MB_OF_MEMORY := $(shell m=`free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2`; if [ "$$m" -lt 384 ]; then echo 384; else echo $$m; fi)
 endif
 
 ifeq ($(SYSTEM_UNAME), FreeBSD)