1

テーマをサポートするために mintty をハッキングしてきました。レポはこちらhttps://github.com/PhilipDaniels/mintty

コードの変更は完了しましたが、cygport を使用したパッケージ化が機能しません。リポジトリを見ると、ルートレベルにあることがわかります

pkg.cygport    # the cygport file
themes/*       # folder with lots of themes

ここに完全な pkg.cygport ファイルがあります

CATEGORY="Base Shells"
DEPEND="gcc-core"
HOMEPAGE="http://mintty.googlecode.com"
SRC_URI="http://mintty.googlecode.com/files/mintty-${PV}-src.tar.bz2"
SUMMARY="Terminal emulator with native Windows look and feel"
DESCRIPTION="\
Mintty is a terminal emulator for Cygwin. It is based on code
from PuTTY 0.60 by Simon Tatham and team.

Features include:
* Xterm-compatible terminal emulation.
* Full Unicode support.
* Native Windows user interface that tries to keep things simple.
* Graphical options dialog. Options stored in a text file.
* Themes.
* Drag & drop and copy & paste of text, files and folders.
* Extensive mouse support.
* Window transparency."

RESTRICT=postinst_doc

src_compile() {
  lndirs
  cd ${B}
  cygmake
}

src_install() {
  cd ${B}
  dobin mintty.exe
  doman docs/mintty.1
  dodoc COPYING LICENSE.Oxygen LICENSE.PuTTY

  # This fails with *** ERROR: file themes/* does not exist 
  # We appear to be in /c/Users/Phil/repos/mintty/mintty-1.3-alpha-1.3/build
  # during this step.
  insinto /usr/share/mintty/themes
  doins themes/*
}

insinto/doins を含む最後の 2 行は、私が追加した唯一の 2 行であり、この時点で別のフォルダーにいるように見えるため、機能しない行です - CD ${B} が犯人だと思います. しかし、それを修正する方法は?

4

1 に答える 1

2

.cygport ファイルへの追加は正しいように見えます。

あなたの問題は、あなたのテーマファイルが作成するtarballにないという事実によるものだと思いますmake pkg.cygportによって解凍され、ソースをビルドしてパッケージ化します.

themes/ ディレクトリを Makefile のファイル リストに追加するのは非常に簡単です。

 src_files := $(wildcard Makefile *.c *.h *.rc *.mft COPYING LICENSE* INSTALL)
 src_files += $(wildcard docs/$(NAME).1 docs/readme*.html scripts/* icon/*)
+src_files += $(wildcard themes/*)

残念ながら、現在一部のテーマ名にスペースが含まれているというわずかな問題があり、それによって正しくエスケープされていません。これらのファイルの名前を変更してビルドを確認しましたが、より洗練されたソリューションを好むかもしれません。

于 2014-08-04T21:07:14.947 に答える