[miglayout] Fix javac complaints about character encoding of source files.
Eric Smith
brouhaha at fedoraproject.org
Sun Oct 9 05:50:55 UTC 2011
commit 638d7060dc3083c1d2f298004ca881abc6d93ef1
Author: Eric Smith <eric at brouhaha.com>
Date: Sat Oct 8 22:50:54 2011 -0700
Fix javac complaints about character encoding of source files.
miglayout.spec | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/miglayout.spec b/miglayout.spec
index 5ab9ba3..80e9ed8 100644
--- a/miglayout.spec
+++ b/miglayout.spec
@@ -41,23 +41,21 @@ This package contains examples and demos code for MiGLayout.
# Fix line endings in some demo and example source files.
dos2unix net/miginfocom/demo/{CallbackDemo,SwingDemo,SwtDemo}.java
dos2unix net/miginfocom/examples/{Example01,Example,ExampleGood}.java
-# Fix Windows codepage 1251 quotes in SwtDemo.java. Note that Java source
-# code is supposed to be in Unicode, *NOT* in codepage 1251, even on
-# Windows!
+# Convert Windows codepage 1251 quotes in SwtDemo.java to UTF-8.
iconv --from=windows-1251 --to=UTF-8 net/miginfocom/demo/SwtDemo.java >net/miginfocom/demo/SwtDemo.java.new
touch -r net/miginfocom/demo/SwtDemo.java{,.new}
mv net/miginfocom/demo/SwtDemo.java{.new,}
%build
export CLASSPATH=%{_libdir}/java/swt.jar:.
-javac net/miginfocom/{layout,swing,swt}/*.java
+javac -encoding utf8 net/miginfocom/{layout,swing,swt}/*.java
# We'll build the demos and examples just to ensure that they compile,
# but we're not going to package the binaries.
# We can't build demo/HiDPISimulator.java due to a missing prerequisite
# (org.jvnet.substance).
-javac net/miginfocom/demo/[CS]*.java
-javac net/miginfocom/examples/*.java
+javac -encoding utf8 net/miginfocom/demo/[CS]*.java
+javac -encoding utf8 net/miginfocom/examples/*.java
jar cmf META-INF/MANIFEST.MF \
%{name}-%{version}.jar \
More information about the scm-commits
mailing list