media-tv/tvbrowser: Add missing patches. Fixes bug 572714.
authorPatrice Clement <monsieurp@gentoo.org>
Sat, 23 Jan 2016 18:18:52 +0000 (18:18 +0000)
committerPatrice Clement <monsieurp@gentoo.org>
Sat, 23 Jan 2016 18:20:28 +0000 (18:20 +0000)
Package-Manager: portage-2.2.26
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
media-tv/tvbrowser/files/3.4.3-build.xml.patch [new file with mode: 0644]
media-tv/tvbrowser/files/3.4.3-remove-registrykey.patch [new file with mode: 0644]

diff --git a/media-tv/tvbrowser/files/3.4.3-build.xml.patch b/media-tv/tvbrowser/files/3.4.3-build.xml.patch
new file mode 100644 (file)
index 0000000..570bff3
--- /dev/null
@@ -0,0 +1,109 @@
+--- build.xml.orig     2015-03-24 17:34:18.753531031 +0000
++++ build.xml  2015-03-24 17:38:48.013509290 +0000
+@@ -105,32 +105,6 @@
+ |  Task definitions\r
+ |\r
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->\r
+-\r
+-  <!-- Creates an .app file for Mac OS X (http://informagen.com/JarBundler/)  -->\r
+-  <taskdef name="jarbundler"\r
+-           classpath="deployment/macosx/jarbundler-2.0.0.jar"\r
+-           classname="net.sourceforge.jarbundler.JarBundler" />\r
+-\r
+-  <!-- Creates a Windows Executable using launch4j (http://launch4j.sf.net) -->\r
+-      <taskdef name="launch4j"\r
+-          classname="net.sf.launch4j.ant.Launch4jTask"\r
+-          classpath="${deployment.dir}/win/launch4j/launch4j.jar:${deployment.dir}/win/launch4j/lib/xstream.jar" />\r
+-\r
+-  <!-- Creates a linux desktopEntry-->\r
+-      <taskdef name="desktopEntry"\r
+-              classname="com.googlecode.ant_deb_task.DesktopEntry"\r
+-              classpathref="ant-deb.classpath"/>\r
+-\r
+-  <!-- Creates an Ubuntu package-->\r
+-      <taskdef name="deb"\r
+-              classname="com.googlecode.ant_deb_task.Deb"\r
+-              classpathref="ant-deb.classpath"/>\r
+-      \r
+-  <!-- Creates a RedHad package-->\r
+-      <taskdef name="rrpm"\r
+-              classname="org.redline_rpm.RedlineTask"\r
+-              classpathref="ant-rpm.classpath"/>\r
+-\r
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r
+ |\r
+ |  Display all targets\r
+@@ -329,6 +303,7 @@
+     <echo message="Creating the jars ..."/>\r
+ \r
+     <!-- Extract the libraries for the tvbrowser.jar into the temp.dir -->\r
++    <!--\r
+     <unjar src="${lib.dir}/${lib.skinlf.name}-${lib.skinlf.version}.jar" dest="${unpacked.dir}/${lib.skinlf.name}.jar"/>\r
+     <unjar src="${lib.dir}/${lib.bsh.name}-${lib.bsh.version}.jar" dest="${unpacked.dir}/${lib.bsh.name}.jar"/>\r
+     <unjar src="${lib.dir}/${lib.jgoodies-common.name}-${lib.jgoodies-common.version}.jar" dest="${unpacked.dir}/${lib.jgoodies-common.name}.jar"/>\r
+@@ -343,6 +318,7 @@
+     <unjar src="${lib.dir}/${lib.texhyphj.name}-${lib.texhyphj.version}.jar" dest="${unpacked.dir}/${lib.texhyphj.name}.jar" />\r
+     <unjar src="${lib.dir}/${lib.substance.name}-${lib.substance.version}.jar" dest="${unpacked.dir}/${lib.substance.name}.jar" />\r
+     <unjar src="${lib.dir}/${lib.trident.name}-${lib.trident.version}.jar" dest="${unpacked.dir}/${lib.trident.name}.jar" />\r
++    -->\r
+ \r
+     <!-- Pack the tvbrowser.jar -->\r
+     <jar jarfile="${tvbrowser-default.runtime.dir}/tvbrowser.jar"\r
+@@ -357,6 +333,7 @@
+       <fileset dir="${classes.dir}" includes="tvdataservice/**"/>\r
+       <fileset dir="${classes.dir}" includes="util/**"/>\r
+       <fileset dir="${classes.dir}" includes="com/**"/>\r
++      <!--\r
+       <fileset dir="${classes.dir}/imgs" includes="splash.png"/>\r
+       <fileset dir="${unpacked.dir}/${lib.skinlf.name}.jar" includes="com/**"/>\r
+         <fileset dir="${unpacked.dir}/${lib.skinlf.name}.jar" includes="org/**"/>\r
+@@ -373,6 +350,7 @@
+       <fileset dir="${unpacked.dir}/${lib.texhyphj.name}.jar" includes="net/**"/>\r
+       <fileset dir="${unpacked.dir}/${lib.substance.name}.jar" includes="org/**"/>\r
+       <fileset dir="${unpacked.dir}/${lib.trident.name}.jar" includes="org/**"/>\r
++      -->\r
+     </jar>\r
+ \r
+     <!-- Copy the other stuff -->\r
+@@ -431,7 +409,9 @@
+ \r
+     <!-- Extract the libraries for the tvbrowser.jar into the temp.dir -->\r
+     <mkdir dir="${unpacked.dir}/${lib.commons.net.name}.jar"/>\r
++    <!--\r
+     <unjar src="${lib.dir}/${lib.commons.net.name}-${lib.commons.net.version}.jar" dest="${unpacked.dir}/${lib.commons.net.name}.jar"/>\r
++    -->\r
+ \r
+   </target>\r
+ \r
+@@ -555,6 +535,7 @@
+       \r
+   <!-- Creates the desktop entry file for Linux platforms -->\r
+   <target name="tvbrowser-desktop-entry">\r
++      <!--\r
+       <desktopEntry\r
+         toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"\r
+         name="TV-Browser"\r
+@@ -571,6 +552,7 @@
+       <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>\r
+       </desktopEntry>\r
+       <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>\r
++    -->\r
+   </target>\r
+ \r
+   <!-- Creates the desktop entry file for Ubuntu platform -->\r
+@@ -752,6 +734,7 @@
+ \r
+   <!-- Creates the windows exe file -->\r
+   <target name="exe" depends="runtime-win">\r
++      <!--\r
+       <launch4j configFile="${deployment.dir}/win/launch4j/tvbrowser.xml"\r
+               fileversion="${tvbrowser.version.file}"\r
+               productversion="${tvbrowser.version.file}"\r
+@@ -762,6 +745,7 @@
+               productversion="${tvbrowser.version.file}"\r
+               txtfileversion="${tvbrowser.version}"\r
+               txtproductversion="${tvbrowser.version}"/>\r
++      -->\r
+   </target>\r
+ \r
+   <!-- Creates the windows transportable exe file -->\r
diff --git a/media-tv/tvbrowser/files/3.4.3-remove-registrykey.patch b/media-tv/tvbrowser/files/3.4.3-remove-registrykey.patch
new file mode 100644 (file)
index 0000000..2c52dda
--- /dev/null
@@ -0,0 +1,150 @@
+--- src/tvbrowser/TVBrowser.java.orig  2015-03-24 17:41:56.811494046 +0000
++++ src/tvbrowser/TVBrowser.java       2015-03-24 17:43:30.625486471 +0000
+@@ -113,9 +113,6 @@
+ import util.ui.UIThreadRunner;\r
+ import util.ui.UiUtilities;\r
+ import util.ui.textcomponentpopup.TextComponentPopupEventQueue;\r
+-import ca.beq.util.win32.registry.RegistryKey;\r
+-import ca.beq.util.win32.registry.RegistryValue;\r
+-import ca.beq.util.win32.registry.RootKey;\r
+ \r
+ import com.jgoodies.looks.LookUtils;\r
+ import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;\r
+@@ -567,77 +564,6 @@
+           public void run() {\r
+             ChannelList.completeChannelLoading();\r
+             initializeAutomaticDownload();\r
+-            if (Launch.isOsWindowsNtBranch()) {\r
+-              try {\r
+-                RegistryKey desktopSettings = new RegistryKey(\r
+-                    RootKey.HKEY_CURRENT_USER, "Control Panel\\Desktop");\r
+-                RegistryValue autoEnd = desktopSettings\r
+-                    .getValue("AutoEndTasks");\r
+-\r
+-                if (autoEnd.getData().equals("1")) {\r
+-                  RegistryValue killWait = desktopSettings\r
+-                      .getValue("WaitToKillAppTimeout");\r
+-\r
+-                  int i = Integer.parseInt(killWait.getData().toString());\r
+-\r
+-                  if (i < 5000) {\r
+-                    JOptionPane pane = new JOptionPane();\r
+-\r
+-                    String cancel = mLocalizer.msg("registryCancel",\r
+-                        "Close TV-Browser");\r
+-                    String dontDoIt = mLocalizer.msg("registryJumpOver",\r
+-                        "Not this time");\r
+-\r
+-                    pane.setOptions(new String[] {\r
+-                        Localizer.getLocalization(Localizer.I18N_OK), dontDoIt,\r
+-                        cancel });\r
+-                    pane.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);\r
+-                    pane.setMessageType(JOptionPane.WARNING_MESSAGE);\r
+-                    pane\r
+-                        .setMessage(mLocalizer\r
+-                            .msg(\r
+-                                "registryWarning",\r
+-                                "The fast shutdown of Windows is activated.\nThe timeout to wait for before Windows is closing an application is too short,\nto give TV-Browser enough time to save all settings.\n\nThe setting hasn't the default value. It was changed by a tool or by you.\nTV-Browser will now try to change the timeout.\n\nIf you don't want to change this timeout select 'Not this time' or 'Close TV-Browser'."));\r
+-\r
+-                    pane.setInitialValue(mLocalizer.msg("registryCancel",\r
+-                        "Close TV-Browser"));\r
+-\r
+-                    JDialog d = pane.createDialog(UiUtilities\r
+-                        .getLastModalChildOf(mainFrame), UIManager\r
+-                        .getString("OptionPane.messageDialogTitle"));\r
+-                    d.setModal(true);\r
+-                    UiUtilities.centerAndShow(d);\r
+-\r
+-                    if (pane.getValue() == null\r
+-                        || pane.getValue().equals(cancel)) {\r
+-                      mainFrame.quit();\r
+-                    } else if (!pane.getValue().equals(dontDoIt)) {\r
+-                      try {\r
+-                        killWait.setData("5000");\r
+-                        desktopSettings.setValue(killWait);\r
+-                        JOptionPane\r
+-                            .showMessageDialog(\r
+-                                UiUtilities.getLastModalChildOf(mainFrame),\r
+-                                mLocalizer\r
+-                                    .msg("registryChanged",\r
+-                                        "The timeout was changed successfully.\nPlease reboot Windows!"));\r
+-                      } catch (Exception registySetting) {\r
+-                        JOptionPane\r
+-                            .showMessageDialog(\r
+-                                UiUtilities.getLastModalChildOf(mainFrame),\r
+-                                mLocalizer\r
+-                                    .msg(\r
+-                                        "registryNotChanged",\r
+-                                        "<html>The Registry value couldn't be changed. Maybe you haven't the right to do it.<br>If it is so contact you Administrator and let him do it for you.<br><br><b><Attention:/b> The following description is for experts. If you change or delete the wrong value in the Registry you could destroy your Windows installation.<br><br>To get no warning on TV-Browser start the Registry value <b>WaitToKillAppTimeout</b> in the Registry path<br><b>HKEY_CURRENT_USER\\Control Panel\\Desktop</b> have to be at least <b>5000</b> or the value for <b>AutoEndTasks</b> in the same path have to be <b>0</b>.</html>"),\r
+-                                Localizer.getLocalization(Localizer.I18N_ERROR),\r
+-                                JOptionPane.ERROR_MESSAGE);\r
+-                      }\r
+-                    }\r
+-                  }\r
+-                }\r
+-              } catch (Throwable registry) {\r
+-              }\r
+-            }\r
+ \r
+             if (currentVersion != null\r
+                 && currentVersion.compareTo(new Version(2, 71, false)) < 0) {\r
+--- src/tvbrowser/ui/settings/StartupSettingsTab.java.orig     2015-03-24 17:51:54.418445794 +0000
++++ src/tvbrowser/ui/settings/StartupSettingsTab.java  2015-03-24 17:52:23.370443456 +0000
+@@ -50,8 +50,6 @@
+ import tvbrowser.ui.mainframe.PeriodItem;\r
+ import util.ui.Localizer;\r
+ import util.ui.UiUtilities;\r
+-import ca.beq.util.win32.registry.RegistryKey;\r
+-import ca.beq.util.win32.registry.RootKey;\r
+ \r
+ import com.jgoodies.forms.builder.PanelBuilder;\r
+ import com.jgoodies.forms.factories.Borders;\r
+@@ -163,41 +161,6 @@
+         .getBoolean());\r
+     mSettingsPn.add(mShowStartScreenChB, cc.xy(2, ++y));\r
+ \r
+-    if (System.getProperty("os.name").toLowerCase().startsWith("windows") && !TVBrowser.isTransportable()) {\r
+-      layout.insertRow(++y, RowSpec.decode("1dlu"));\r
+-      layout.insertRow(++y, RowSpec.decode("pref"));\r
+-\r
+-      try {\r
+-        RegistryKey shellFolders = new RegistryKey(RootKey.HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders");\r
+-        String path = shellFolders.getValue("Startup").getData().toString();\r
+-\r
+-        if(path == null || path.length() < 1 || !(new File(path)).isDirectory()) {\r
+-          throw new Exception();\r
+-        }\r
+-\r
+-        mLinkFileFile = new File(path,"TV-Browser.url");\r
+-\r
+-        try {\r
+-          mLinkFile = new LinkFile(mLinkFileFile);\r
+-\r
+-          if(mLinkFileFile.isFile()) {\r
+-            try {\r
+-              if (!mLinkFile.hasTarget((new File("tvbrowser.exe")).getAbsoluteFile())) {\r
+-                createLink(mLinkFile);\r
+-              }\r
+-            }catch(Exception linkException) {\r
+-              mLinkFileFile.delete();\r
+-            }\r
+-          }\r
+-        }catch(FileNotFoundException fe) {}\r
+-\r
+-        mAutostartWithWindows = new JCheckBox(mLocalizer.msg("autostart","Start TV-Browser with Windows"),\r
+-            mLinkFileFile.isFile());\r
+-\r
+-        mSettingsPn.add(mAutostartWithWindows, cc.xy(2, y));\r
+-      } catch (Throwable e) {e.printStackTrace();}\r
+-    }\r
+-\r
+     y++;\r
+ \r
+     mSettingsPn.add(createRefreshPanel(), cc.xyw(1,++y,5));\r
+@@ -513,4 +476,4 @@
+       return new File(mTarget).equals(file);\r
+     }\r
+   }\r
+-}
+\ No newline at end of file
++}\r