code:
namespace local = ""
namespace inh = inherit

start = PISI

PISI = element PISI { Source, Package+, History }

Source =
   element Source
   {
      Name,
      Homepage,
      Packager,
      License+,
      Icon?,
      IsA*,
      PartOf?,
      Summary+,
      Description*,
      Archive,
      BuildDependencies?,
      Patches?
   }

Package =
   element Package
   {
      Name,
      License?,
      IsA*,
      PartOf?,
      Summary*,
      Description*,
      RuntimeDependencies?,
      Conflicts?,
      Replaces?,
      Files,
      AdditionalFiles?,
      Provides?
   }

History = element History { Update+ }

Name =
   element Name
   {
      xsd:string { pattern = "[0-9a-zA-Z\-_+]*" maxLength = "255" }
   }

Homepage = element Homepage { text }

Icon = element Icon { text }

Packager = element Packager { Packager.Name, Email }

Packager.Name = element Name { xsd:string { maxLength = "255" } }

Email = element Email { text }

License =
   element License
   {
      "3DFX"
    | "3proxy"
    | "3ware"
    | "4F"
    | "7plus"
    | "9wm"
    | "ACME"
    | "ACML"
    | "AECA"
    | "AFL-2.0"
    | "AFL-2.1"
    | "AFL-3.0"
    | "AFTERSTEP"
    | "AGREP"
    | "AICCU"
    | "ALMWorks-1.2"
    | "AMD"
    | "AMPAS"
    | "AMS"
    | "ANTLR"
    | "APL-1.0"
    | "APSL-2"
    | "ATI"
    | "ATOK"
    | "ATT"
    | "AURA"
    | "Adaptec"
    | "Adobe"
    | "Adobe-SourceCode"
    | "AdobeFlash-9.0.31.0"
    | "Aladdin"
    | "Allegro"
    | "Apache-1.1"
    | "Apache-2.0"
    | "Apple"
    | "Arkkra"
    | "Army-EULA"
    | "Arphic"
    | "Artistic"
    | "Artistic-2"
    | "Atmel"
    | "AvP"
    | "BAEKMUK"
    | "BCS"
    | "BEER-WARE"
    | "BL"
    | "BSD"
    | "BSD-2"
    | "BWidget"
    | "BZIP2"
    | "Babylon"
    | "BitTorrent"
    | "BitstreamVera"
    | "Blitz-Artistic"
    | "Boost-1.0"
    | "C3"
    | "CAOSL"
    | "CAPS"
    | "CAVER"
    | "CCPL-Attribution-2.0"
    | "CCPL-Attribution-3.0"
    | "CCPL-Attribution-NonCommercial-NoDerivs-2.0"
    | "CCPL-Attribution-NonCommercial-NoDerivs-2.5"
    | "CCPL-Attribution-ShareAlike-2.0"
    | "CCPL-Attribution-ShareAlike-2.5"
    | "CCPL-Attribution-ShareAlike-3.0"
    | "CCPL-Attribution-ShareAlike-NonCommercial-2.5"
    | "CCPL-ShareAlike-1.0"
    | "CDDL"
    | "CDDL-Schily"
    | "CDF"
    | "CGL"
    | "CMASS-M3"
    | "CMake"
    | "CNRI"
    | "CNRI-QUIXOTE-2.4"
    | "CPL-0.5"
    | "CPL-1.0"
    | "CRACKLIB"
    | "CROSSOVER"
    | "CS-1.0"
    | "Caldera"
    | "CeCILL-2"
    | "Cenon"
    | "Ciphire"
    | "Clarified-Artistic"
    | "Conexant"
    | "Conexant-firmware"
    | "CyberNeko-1.0"
    | "D1X"
    | "DB"
    | "DCC"
    | "DEC-M3"
    | "DES"
    | "DMD"
    | "DNS2GO"
    | "DOOM3"
    | "DSL"
    | "DSNIFF"
    | "DUMB-0.9.2"
    | "EAPL"
    | "ECWPL"
    | "EDB"
    | "EPL"
    | "EPL-1.0"
    | "EPSON"
    | "ETQW"
    | "ElementTree"
    | "Elm"
    | "Emacs"
    | "Exolab"
    | "F-PROT"
    | "FDL-1.1"
    | "FDL-1.2"
    | "FESTIVAL"
    | "FIPL-1.0"
    | "FLEX"
    | "FLTK"
    | "FML-1"
    | "FTL"
    | "FVWM"
    | "FastCGI"
    | "FreeArt"
    | "Frodo"
    | "GAlib"
    | "GDLS"
    | "GLX"
    | "GMGPL"
    | "GPLv1"
    | "GPLv2"
    | "GPLv2+"
    | "GPLv2-with-MySQL-FLOSS-exception"
    | "GPLv2-with-exceptions"
    | "GPLv2-with-linking-exception"
    | "GPLv3"
    | "GPLv3+"
    | "HBRL"
    | "HKSCS"
    | "HPL"
    | "HYDRA"
    | "Hauppauge-Firmware"
    | "HyperSpec"
    | "IBM"
    | "IBM-ILNWP"
    | "IBM-J1.4"
    | "IBM-J1.5"
    | "IBM-J1.6"
    | "ICE"
    | "IPL-1"
    | "IRPDL"
    | "ISC"
    | "ITS4"
    | "Info-ZIP"
    | "Inform"
    | "Intel"
    | "Intel-SDP"
    | "Interbase-1.0"
    | "Introversion"
    | "JDOM"
    | "JNIC"
    | "JPython"
    | "JamesClark"
    | "JasPer"
    | "KQEMU"
    | "KenMacLeod"
    | "Kermit"
    | "LDP"
    | "LDP-1a"
    | "LFS"
    | "LGPLv2"
    | "LGPLv2+"
    | "LGPLv2.1"
    | "LGPLv2.1-FPC"
    | "LGPLv2.1-UUST"
    | "LGPLv2.1-linking-exception"
    | "LGPLv3"
    | "LGPLv3+"
    | "LIBGLOSS"
    | "LICENSE-BITSTREAM"
    | "LLGPL-2.1"
    | "LOKI-EULA"
    | "LPPL-1.2"
    | "LPPL-1.3"
    | "LPPL-1.3b"
    | "LPPL-1.3c"
    | "LRCTF"
    | "MARBLEBLAST"
    | "MBROLA"
    | "MILO"
    | "MIT"
    | "MOTIF"
    | "MPEG4"
    | "MPL-1.0"
    | "MPL-1.1"
    | "MSF-1.2"
    | "MSjdbcEULA"
    | "MSttfEULA"
    | "Macromedia"
    | "MakeIndex"
    | "Memonix"
    | "MonetDBPL-1.1"
    | "Moria"
    | "Mozart"
    | "NCSA-HDF"
    | "NEWLIB"
    | "NPL-1.1"
    | "NVIDIA"
    | "NWL"
    | "NWN-EULA"
    | "Nero"
    | "Nessus-EULA"
    | "NewArtisans"
    | "No-Problem-Bugroff"
    | "Norvig"
    | "OFL"
    | "OFL-1.1"
    | "OGL-1.0a"
    | "OGTSL"
    | "OPENLDAP"
    | "OPERA-9.0"
    | "OPL"
    | "ORIONSERVER"
    | "OSI-Approved"
    | "OSIRIS"
    | "OSL-1.1"
    | "OSL-2.0"
    | "OTN"
    | "Omni"
    | "OpenSoftware"
    | "OpenSymphony-1.1"
    | "OracleDB"
    | "PAM"
    | "PBZIP2"
    | "PDB"
    | "PDFLite"
    | "PEL"
    | "PHP"
    | "PHP-2.02"
    | "PHP-3"
    | "PHP-3.01"
    | "PICO"
    | "PLAN9"
    | "PLDSPv2"
    | "POMPOM"
    | "POSTGRESQL"
    | "PSF-2.2"
    | "PSF-2.3"
    | "PSF-2.4"
    | "PSTT"
    | "PUEL"
    | "PYTHON"
    | "Palm-SDK"
    | "Panda3D"
    | "Pando-EULA"
    | "Parallels"
    | "PathfinderPL-1.1"
    | "PicoContainer"
    | "PoseidonCommon.pdf"
    | "Princeton"
    | "Q2EULA"
    | "Q3AEULA"
    | "QPL"
    | "QPL-1.0"
    | "QUAKE4"
    | "RAR"
    | "RDist"
    | "REALbasic"
    | "RSA-MD2"
    | "RSA-MD4"
    | "RSA-MD5"
    | "RSA-PKCS11"
    | "RTCW"
    | "RTCW-ETEULA"
    | "Racer"
    | "Resounding"
    | "RiceBSD"
    | "Roadrunner"
    | "Ruby"
    | "SGI-B"
    | "SGI-B-1.1"
    | "SGMLUG"
    | "SIFT"
    | "SIL-freeware"
    | "SNNS-4.2"
    | "SOPLA-2.3"
    | "SPL"
    | "SVFL"
    | "Scintilla"
    | "Sendmail"
    | "Sendmail-Open-Source"
    | "SixXS"
    | "Sleepycat"
    | "Smart-Link"
    | "SpeedTouch-USB-Firmware"
    | "Spice-1.1"
    | "Spread-1.0"
    | "Stanford"
    | "Stuffit"
    | "Subversion"
    | "Sudo"
    | "THINKTANKS"
    | "TeX"
    | "Tinker"
    | "UCAR-Unidata"
    | "UCL"
    | "VGBA"
    | "VIGRA"
    | "VOSTROM"
    | "VPL-1.0"
    | "ValveSDK"
    | "ValveServer"
    | "Volano"
    | "W3C"
    | "W3C-document"
    | "WANPIPE"
    | "WRI-EULA"
    | "WTFPL-2"
    | "WarpPipe"
    | "WebMO"
    | "Werken-1.1.1.1"
    | "WordNet-1.6"
    | "X11"
    | "XAnim"
    | "XCIN"
    | "Xdebug"
    | "XeTeX"
    | "Ximian-logos"
    | "YAZ"
    | "ZBL"
    | "ZLIB"
    | "ZORK"
    | "ZPL"
    | "ZSH"
    | "ZendFramework-1.1"
    | "aczoom"
    | "adobe-ps"
    | "adom"
    | "aewm"
    | "amiwm"
    | "anubis"
    | "appres"
    | "aquafont"
    | "arj"
    | "as-is"
    | "astrolog"
    | "astromenace"
    | "atheros-hal"
    | "bakoma"
    | "bass"
    | "bdftopcf"
    | "bea.ri.jsr173"
    | "beforelight"
    | "bestcrypt"
    | "bigreqsproto"
    | "bioapi"
    | "bitmap"
    | "blackshades"
    | "bonnie"
    | "bungie-marathon"
    | "cadsoft"
    | "canada-med"
    | "ccc-beta"
    | "ccp4"
    | "cdegroot"
    | "cedega"
    | "charm"
    | "chasen"
    | "chntpw"
    | "circlemud"
    | "cisco"
    | "cisco-vpn-client"
    | "clibpdf"
    | "clustalw"
    | "cmigemo"
    | "cns"
    | "codehaus-classworlds"
    | "codehaus-groovy"
    | "colt"
    | "compaq-sdla"
    | "compositeproto"
    | "cos"
    | "crafty"
    | "crazney"
    | "cryptopp"
    | "damageproto"
    | "dbgphp"
    | "descent2-data"
    | "dgen-sdl"
    | "distributed.net"
    | "dlj-1.1"
    | "dmxproto"
    | "dom4j"
    | "dvibook"
    | "eGenixPublic"
    | "eGenixPublic-1.1"
    | "editres"
    | "egressor"
    | "encodings"
    | "eternal_lands"
    | "evieext"
    | "fixesproto"
    | "fmod"
    | "folding-at-home"
    | "font-adobe-100dpi"
    | "font-adobe-75dpi"
    | "font-adobe-utopia-100dpi"
    | "font-adobe-utopia-75dpi"
    | "font-adobe-utopia-type1"
    | "font-alias"
    | "font-arabic-misc"
    | "font-bh-100dpi"
    | "font-bh-75dpi"
    | "font-bh-lucidatypewriter-100dpi"
    | "font-bh-lucidatypewriter-75dpi"
    | "font-bh-ttf"
    | "font-bh-type1"
    | "font-bitstream-100dpi"
    | "font-bitstream-75dpi"
    | "font-bitstream-speedo"
    | "font-bitstream-type1"
    | "font-cronyx-cyrillic"
    | "font-cursor-misc"
    | "font-daewoo-misc"
    | "font-dec-misc"
    | "font-ibm-type1"
    | "font-isas-misc"
    | "font-jis-misc"
    | "font-micro-misc"
    | "font-misc-cyrillic"
    | "font-misc-ethiopic"
    | "font-misc-meltho"
    | "font-misc-misc"
    | "font-mutt-misc"
    | "font-schumacher-misc"
    | "font-screen-cyrillic"
    | "font-sony-misc"
    | "font-sun-misc"
    | "font-util"
    | "font-winitzki-cyrillic"
    | "font-xfree86-type1"
    | "fontcacheproto"
    | "fontconfig"
    | "fontsproto"
    | "fonttosfnt"
    | "fping"
    | "free-noncomm"
    | "freedist"
    | "freemarker"
    | "freetts"
    | "fslsfonts"
    | "fstobdf"
    | "galaxyhack"
    | "gamess"
    | "gccmakedep"
    | "gips_iLBClicense.pdf"
    | "glest-data"
    | "glimpse"
    | "glproto"
    | "glut"
    | "gnuplot"
    | "google-picasa"
    | "googleearth"
    | "grass-ipafonts"
    | "guild"
    | "hp-value"
    | "hylafax"
    | "hyperic"
    | "iASL"
    | "iceauth"
    | "ico"
    | "icu"
    | "imagemagick"
    | "imake"
    | "informix-jdbc"
    | "inmon-sflow"
    | "inputproto"
    | "ipadic"
    | "ipw2100-fw"
    | "ipw2200-fw"
    | "ipw3945"
    | "isc-dhcp"
    | "ixp4xx"
    | "jardinains"
    | "jaxen"
    | "jcraft"
    | "jdepend"
    | "jlex"
    | "jrockit"
    | "kbproto"
    | "kinterbasdb"
    | "knights-demo"
    | "kvirc"
    | "lbxproxy"
    | "less"
    | "levee"
    | "lha"
    | "libFS"
    | "libICE"
    | "libSM"
    | "libX11"
    | "libXScrnSaver"
    | "libXTrap"
    | "libXau"
    | "libXaw"
    | "libXcomposite"
    | "libXcursor"
    | "libXdamage"
    | "libXdmcp"
    | "libXevie"
    | "libXext"
    | "libXfixes"
    | "libXfont"
    | "libXfontcache"
    | "libXft"
    | "libXi"
    | "libXinerama"
    | "libXmu"
    | "libXp"
    | "libXpm"
    | "libXprintAppUtil"
    | "libXprintUtil"
    | "libXrandr"
    | "libXrender"
    | "libXres"
    | "libXt"
    | "libXtst"
    | "libXv"
    | "libXvMC"
    | "libXxf86dga"
    | "libXxf86misc"
    | "libXxf86vm"
    | "libdmx"
    | "libdomainkeys-1.1"
    | "libdrm"
    | "libf2c"
    | "libffi"
    | "libfontenc"
    | "liblbxutil"
    | "liboldX"
    | "libxkbfile"
    | "libxkbui"
    | "lisp2wish"
    | "listres"
    | "lndir"
    | "lsof"
    | "luit"
    | "maestro"
    | "makedepend"
    | "mammoth"
    | "mapm"
    | "marginalhacks"
    | "maui"
    | "maya-5.0"
    | "mayadoc-5.0"
    | "mekanix"
    | "meme"
    | "mindterm"
    | "mkcfm"
    | "mkfontdir"
    | "mkfontscale"
    | "mmix"
    | "molmol"
    | "molscript"
    | "mongrel"
    | "mopac7"
    | "mplus-fonts"
    | "mserv"
    | "mupad"
    | "mx4j"
    | "myspell-en_CA-JRossBeresford"
    | "myspell-en_CA-KevinAtkinson"
    | "myspell-et_EE-IEL"
    | "myspell-hyph_sk_SK-TiborBako"
    | "myspell-ispell-GeoffKuenning"
    | "myspell-lt_LT-AlbertasAgejevas"
    | "myspell-ru_RU-ALexanderLebedev"
    | "myspell-th_cs_CZ-PavelRychlySmrz"
    | "namd"
    | "nemerle"
    | "nethack"
    | "netlogo"
    | "netperf"
    | "newton"
    | "nhc98"
    | "nomachine"
    | "oclock"
    | "openafs-krb5"
    | "openafs-krb5-a"
    | "openknights"
    | "openmarket"
    | "openpbs"
    | "openspml"
    | "openssl"
    | "oracle-jdbc"
    | "otter"
    | "paraview"
    | "penguzzle"
    | "perforce"
    | "petrify"
    | "pgasync"
    | "phrack"
    | "pixman"
    | "pkcrack"
    | "pmd"
    | "point2play"
    | "postal2"
    | "poster"
    | "povlegal-3.1g"
    | "povlegal-3.5"
    | "povlegal-3.6"
    | "printproto"
    | "proxymngr"
    | "public-domain"
    | "pymol"
    | "pysqlite"
    | "qeradiant"
    | "qlogic-fibre-channel-firmware"
    | "qpage"
    | "qpopper"
    | "quake1-demodata"
    | "quake2-demodata"
    | "queen"
    | "qwt"
    | "randrproto"
    | "recordproto"
    | "renderproto"
    | "resourceproto"
    | "rgb"
    | "richardson"
    | "ringtonetools"
    | "rstart"
    | "ruby-debug"
    | "satan"
    | "saxpath"
    | "scilab"
    | "scripts"
    | "scrnsaverproto"
    | "selfhtml"
    | "sessreg"
    | "setxkbmap"
    | "shoutcast"
    | "showfont"
    | "simpserver-test"
    | "singular"
    | "sip"
    | "skype-eula"
    | "smproxy"
    | "sparky"
    | "ssh"
    | "sslwrap"
    | "staden"
    | "stardock-images"
    | "stix"
    | "sun-asis-javamake"
    | "sun-bcla-j2ee"
    | "sun-bcla-j2ee-deployment"
    | "sun-bcla-j2me"
    | "sun-bcla-jai"
    | "sun-bcla-java-vm"
    | "sun-bcla-java-vm-1.4.2"
    | "sun-bcla-jimi"
    | "sun-bcla-jmf"
    | "sun-bcla-jmi"
    | "sun-bcla-jms"
    | "sun-bcla-jsapi"
    | "sun-bcla-jsr101"
    | "sun-bcla-jta"
    | "sun-bcla-jvmstat"
    | "sun-csl"
    | "sun-j2sl"
    | "sun-j2sl-6"
    | "sun-jdl"
    | "sun-jrl"
    | "sun-jsr67"
    | "sun-jsr93"
    | "sun-openlook"
    | "sun-rpc"
    | "swiss-prot"
    | "szip"
    | "t-coffee"
    | "tacc"
    | "tcp_wrappers_license"
    | "tkMOO"
    | "tlswrap"
    | "trac"
    | "trapproto"
    | "trolltech_PUL-1.0"
    | "truecrypt-collective-1.0"
    | "ttf2pt1"
    | "twm"
    | "unRAR"
    | "ut2003"
    | "ut2003-demo"
    | "util-macros"
    | "ventrilo"
    | "videoproto"
    | "vienna-rna"
    | "viewcvs"
    | "viewres"
    | "vim"
    | "visual"
    | "vlgothic"
    | "vmd"
    | "vmware"
    | "vmware-console"
    | "w3m"
    | "werken.xpath"
    | "whitehead"
    | "wxWinFDL-3"
    | "wxWinLL-3"
    | "x11perf"
    | "xauth"
    | "xbacklight"
    | "xbattle"
    | "xbiff"
    | "xbitmaps"
    | "xboing"
    | "xcalc"
    | "xclipboard"
    | "xclock"
    | "xcmiscproto"
    | "xcmsdb"
    | "xconsole"
    | "xcursor-themes"
    | "xcursorgen"
    | "xdbedizzy"
    | "xditview"
    | "xdm"
    | "xdpyinfo"
    | "xdriinfo"
    | "xearth"
    | "xedit"
    | "xev"
    | "xextproto"
    | "xeyes"
    | "xf86-input-acecad"
    | "xf86-input-aiptek"
    | "xf86-input-calcomp"
    | "xf86-input-citron"
    | "xf86-input-digitaledge"
    | "xf86-input-dmc"
    | "xf86-input-dynapro"
    | "xf86-input-elo2300"
    | "xf86-input-elographics"
    | "xf86-input-evdev"
    | "xf86-input-fpit"
    | "xf86-input-hyperpen"
    | "xf86-input-jamstudio"
    | "xf86-input-joystick"
    | "xf86-input-keyboard"
    | "xf86-input-magellan"
    | "xf86-input-magictouch"
    | "xf86-input-microtouch"
    | "xf86-input-mouse"
    | "xf86-input-mutouch"
    | "xf86-input-palmax"
    | "xf86-input-penmount"
    | "xf86-input-spaceorb"
    | "xf86-input-summa"
    | "xf86-input-tek4957"
    | "xf86-input-ur98"
    | "xf86-input-vmmouse"
    | "xf86-input-void"
    | "xf86-video-amd"
    | "xf86-video-apm"
    | "xf86-video-ark"
    | "xf86-video-ati"
    | "xf86-video-chips"
    | "xf86-video-cirrus"
    | "xf86-video-cyrix"
    | "xf86-video-dummy"
    | "xf86-video-fbdev"
    | "xf86-video-glint"
    | "xf86-video-i128"
    | "xf86-video-i740"
    | "xf86-video-i810"
    | "xf86-video-impact"
    | "xf86-video-imstt"
    | "xf86-video-mga"
    | "xf86-video-neomagic"
    | "xf86-video-newport"
    | "xf86-video-nsc"
    | "xf86-video-nv"
    | "xf86-video-rendition"
    | "xf86-video-s3"
    | "xf86-video-s3virge"
    | "xf86-video-savage"
    | "xf86-video-siliconmotion"
    | "xf86-video-sis"
    | "xf86-video-sisusb"
    | "xf86-video-sunbw2"
    | "xf86-video-suncg14"
    | "xf86-video-suncg3"
    | "xf86-video-suncg6"
    | "xf86-video-sunffb"
    | "xf86-video-sunleo"
    | "xf86-video-suntcx"
    | "xf86-video-tdfx"
    | "xf86-video-tga"
    | "xf86-video-trident"
    | "xf86-video-tseng"
    | "xf86-video-v4l"
    | "xf86-video-vermilion"
    | "xf86-video-vesa"
    | "xf86-video-vga"
    | "xf86-video-via"
    | "xf86-video-vmware"
    | "xf86-video-voodoo"
    | "xf86-video-xgi"
    | "xf86bigfontproto"
    | "xf86dga"
    | "xf86dgaproto"
    | "xf86driproto"
    | "xf86miscproto"
    | "xf86rushproto"
    | "xf86vidmodeproto"
    | "xfd"
    | "xfindproxy"
    | "xfontsel"
    | "xfs"
    | "xfsinfo"
    | "xfwp"
    | "xgamma"
    | "xgc"
    | "xhost"
    | "xineramaproto"
    | "xinit"
    | "xkbcomp"
    | "xkbdata"
    | "xkbevd"
    | "xkbprint"
    | "xkbutils"
    | "xkill"
    | "xload"
    | "xlogo"
    | "xlsatoms"
    | "xlsclients"
    | "xlsfonts"
    | "xmag"
    | "xmame"
    | "xman"
    | "xmessage"
    | "xmh"
    | "xmlformat"
    | "xmodmap"
    | "xmore"
    | "xorg-cf-files"
    | "xorg-docs"
    | "xorg-server"
    | "xorg-sgml-doctools"
    | "xphelloworld"
    | "xplsprinters"
    | "xpr"
    | "xprehashprinterlist"
    | "xprop"
    | "xproto"
    | "xproxymanagementprotocol"
    | "xrandr"
    | "xrdb"
    | "xref.lisp"
    | "xrefresh"
    | "xrx"
    | "xset"
    | "xsetmode"
    | "xsetpointer"
    | "xsetroot"
    | "xshipwars"
    | "xsm"
    | "xstdcmap"
    | "xtrans"
    | "xtrap"
    | "xv"
    | "xvidtune"
    | "xvinfo"
    | "xwd"
    | "xwininfo"
    | "xwud"
    | "zend-optimizer"
    | "zoo"
   }

IsA =
   element IsA
   {
      "app"
    | "app:console"
    | "app:gui"
    | "app:web"
    | "library"
    | "service"
    | "data"
    | "data:doc"
    | "data:font"
    | "kernel"
    | "driver"
    | "locale"
    | "locale:tr"
    | "locale:en"
    | "locale:es"
    | "locale:nl"
    | "locale:fr"
    | "locale:de"
    | "locale:it"
   }

PartOf = element PartOf { text }

Summary = element Summary { attlist.Summary, text }

attlist.Summary &= attribute xml:lang { text }?

Description = element Description { attlist.Description, text }

attlist.Description &= attribute xml:lang { text }?

Archive = element Archive { attlist.Archive, text }

attlist.Archive &=
   attribute sha1sum { text },
   attribute type
   {
      "targz" | "tarbz2" | "tarlzma" | "tar" | "zip" | "gzip" | "binary"
   }

BuildDependencies = element BuildDependencies { Dependency+ }

Dependency = element Dependency { attlist.VersionReleaseToFrom, text }

attlist.VersionReleaseToFrom =
   attribute versionFrom { text }?,
   attribute versionTo { text }?,
   attribute version { text }?,
   attribute releaseFrom { text }?,
   attribute releaseTo { text }?,
   attribute release { text }?

Patches = element Patches { Patch+ }

Patch = element Patch { attlist.Patch, text }

attlist.Patch &=
   attribute compressionType { text }?,
   attribute level { text }?,
   attribute target { text }?

Provides = element Provides { COMAR+ }

COMAR = element COMAR { attlist.COMAR, text }

attlist.COMAR = attribute script { text }?

Conflicts = element Conflicts { Conflicts.Package+ }

Conflicts.Package = element Package { attlist.VersionReleaseToFrom, text }

Replaces = element Replaces { Replaces.Package+ }

Replaces.Package = element Package { attlist.VersionReleaseToFrom, text }

AdditionalFiles = element AdditionalFiles { AdditionalFile+ }

AdditionalFile = element AdditionalFile { attlist.AdditionalFile, text }

attlist.AdditionalFile =
   attribute target { text },
   attribute permission { text }?,
   attribute owner { text }?

RuntimeDependencies = element RuntimeDependencies { Dependency+ }

Files = element Files { Path+ }

Path = element Path { attlist.Path, text }

attlist.Path &=
   attribute fileType
   {
      "executable"
    | "library"
    | "data"
    | "config"
    | "doc"
    | "man"
    | "info"
    | "localedata"
    | "header"
   },
   attribute permanent { "false" | "true" }?

Update =
   element Update
   {
      attlist.Update,
      Date,
      Version,
      Comment,
      Packager.Name,
      Email
   }

attlist.Update &=
   attribute release { text },
   attribute type { "security" | "bug" }?

Date = element Date { xsd:date }

Version = element Version { text }

Comment = element Comment { text }


code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Default configuration file for GNU/Emacs on Pisi Linux ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq column-number-mode t)                  ; show column numbers below

(display-time-mode t)                        ; display time below

(show-paren-mode t)                          ; show parenthesis

(transient-mark-mode t)                      ; show mark visually...

;; (setq make-backup-files nil)              ; no nasty back-up files

(setq-default show-trailing-whitespace t)    ; show trailing whitespace

(setq frame-title-format "%b (%m)")          ; descriptive frame title "filename (mode)"

(setq scroll-step 1)                         ; scroll one line at a time

(setq load-path (cons "~/.elisp" load-path)) ; add ~/.elisp as a custom load path

(set-face-foreground 'font-lock-comment-face "red") ; show comments in red

(set-scroll-bar-mode 'right) ; show scrollbar on the right

;; use ibuffer by default
(global-set-key (kbd "C-x C-b") 'ibuffer)
(autoload 'ibuffer "ibuffer" "List buffers." t)

;; for zpspell
(setq ispell-program-name "zpspell")
(setq ispell-local-dictionary-alist
              `((nil
              "[A-ZŞĞIa-zşğı]"
              "[^A-ZŞĞIa-zşğı]"
              "[']" nil ("") "~utf-8" utf-8)))

;; Autoload init files under /etc/emacs/site-lisp
(defun pardus-auto-load-all ()
  "Autoload all init files under /etc/emacs/site-lisp"
  (mapcar '(lambda (f)
             (if (pardus-file-or-symlink-exists-p f)
                 (load f)
               nil))
          (sort
           (el-files-in-directory "/etc/emacs/site-lisp/")
           'string-lessp)))

(defun pardus-file-or-symlink-exists-p (f)
  "Check if file or symlink exists"
  (let ((f-symlink-target (file-symlink-p f)))
    (if f-symlink-target
        (let ((f-symlink-target-path
               (concat (file-name-directory f) f-symlink-target)))
          (if (file-exists-p f-symlink-target-path)
              t
            nil))
      (file-exists-p f))))

(defun el-files-in-directory (directory)
  "List the .el files in DIRECTORY and in its sub-directories."
  (let (el-files-list
        (current-directory-list
         (directory-files-and-attributes directory t)))
    ;; while we are in the current directory
    (while current-directory-list
      (cond
       ;; check to see whether filename ends in `.el'
       ;; and if so, append its name to a list.
       ((equal ".el" (substring (car (car current-directory-list)) -3))
        (setq el-files-list
              (cons (car (car current-directory-list)) el-files-list)))
       ;; check whether filename is that of a directory
       ((eq t (car (cdr (car current-directory-list))))
        ;; decide whether to skip or recurse
        (if
            (equal (or "." "..")
                   (substring (car (car current-directory-list)) -1))
            ;; then do nothing if filename is that of
            ;;   current directory or parent
            ()
          ;; else descend into the directory and repeat the process
          (setq el-files-list
                (append
                 (el-files-in-directory
                  (car (car current-directory-list)))
                 el-files-list)))))
      ;; move to the next filename in the list; this also
      ;; shortens the list so the while loop eventually comes to an end
      (setq current-directory-list (cdr current-directory-list)))
    ;; return the filenames
    el-files-list))

repo_name: ayhanyalcinsoy/main


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>emacs</Name>
        <Homepage>http://www.gnu.org/software/emacs</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv3+</License>
        <Icon>emacs</Icon>
        <IsA>app:gui</IsA>
        <IsA>app:console</IsA>
        <Summary>An extensible console-mode editor</Summary>
        <Description>Emacs is the extensible, customizable, self-documenting real-time console-mode editor. It has many features to increase productivity when programming.</Description>
        <Archive sha1sum="3960d0b64031c645d98aafd4dc9ebf6f6ef4cf50" type="tarxz">ftp://mirrors.kernel.org/gnu/emacs/emacs-25.2.tar.xz</Archive>
        <BuildDependencies>
            <Dependency>acl-devel</Dependency>
            <Dependency>gtk2-devel</Dependency>
            <Dependency>gtk3-devel</Dependency>
            <Dependency>alsa-lib-devel</Dependency>
            <Dependency>fontconfig-devel</Dependency>
            <Dependency>giflib-devel</Dependency>
            <Dependency>gpm</Dependency>
            <Dependency>libjpeg-turbo-devel</Dependency>
            <Dependency>libICE-devel</Dependency>
            <Dependency>libSM-devel</Dependency>
            <Dependency>libXft-devel</Dependency>
            <Dependency>libxml2-devel</Dependency>
            <Dependency>libXpm-devel</Dependency>
            <Dependency>libXrender-devel</Dependency>
            <Dependency>libpng-devel</Dependency>
            <Dependency>librsvg-devel</Dependency>
            <Dependency>tiff-devel</Dependency>
            <Dependency>gnutls-devel</Dependency>
            <Dependency>imagemagick-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>emacs</Name>
        <RuntimeDependencies>
            <Dependency>acl</Dependency>
            <Dependency>gpm</Dependency>
            <Dependency>tiff</Dependency>
            <Dependency>gtk2</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency>glib2</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>libpng</Dependency>
            <Dependency>ncurses</Dependency>
            <Dependency>freetype</Dependency>
            <Dependency>libSM</Dependency>
            <Dependency>libXft</Dependency>
            <Dependency>libxml2</Dependency>
            <Dependency>libICE</Dependency>
            <Dependency>giflib</Dependency>
            <Dependency>libXpm</Dependency>
            <Dependency>gnutls</Dependency>
            <Dependency>librsvg</Dependency>
            <Dependency>alsa-lib</Dependency>
            <Dependency>gdk-pixbuf</Dependency>
            <Dependency>fontconfig</Dependency>
            <Dependency>libXrender</Dependency>
            <Dependency>imagemagick</Dependency>
            <Dependency>libjpeg-turbo</Dependency>
            <Dependency>libXfixes</Dependency>
            <Dependency>libxcb</Dependency>
            <Dependency>dbus</Dependency>
            <Dependency>gtk3</Dependency>
            <Dependency>cairo</Dependency>
            <Dependency>pango</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="info">/usr/share/info</Path>
            <Path fileType="data">/usr/share/emacs</Path>
            <Path fileType="data">/usr/share/icons</Path>
            <Path fileType="data">/var/games/emacs</Path>
            <Path fileType="data">/usr/share/pixmaps</Path>
            <Path fileType="data">/usr/share/appdata</Path>
            <Path fileType="data">/usr/share/applications</Path>
            <Path fileType="executable">/usr/libexec/emacs</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/emacs/25.4/site-lisp/site-start.el">site-start.el</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/emacs/25.4/etc/schema/pisi-spec.rnc">pisi-spec.rnc</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/emacs/site-lisp/80-nxml-mode.el">80-nxml-mode.el</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/applications/emacs.desktop">emacs.desktop</AdditionalFile>
        </AdditionalFiles>
        <Provides>
            <COMAR script="pakhandler.py">System.PackageHandler</COMAR>
        </Provides>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-05-10</Date>
            <Version>25.2</Version>
            <Comment>Version Bump</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>24.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-04-02</Date>
            <Version>24.5</Version>
            <Comment>First release</Comment>
            <Name>Ilker Manap</Name>
            <Email>ilkermanap@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>emacs</Name>
        <Summary xml:lang="tr">Genişletilebilir bir metin düzenleyici</Summary>
        <Description xml:lang="tr">Emacs, gelişmiş, özelleştirilebilir ve esnek bir metin editörüdür. Özellikle program yazanlar tarafından çokça tercih edilen, fare kullanımına gerek bırakmadan çok hızlı çalışma imkânı sağlayan bir editördür.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import get
from pisi.actionsapi import pisitools
from pisi.actionsapi import pythonmodules

#WorkDir="pinard-Pymacs-5989046"

def install():
    pythonmodules.install()
    pisitools.insinto("/usr/share/emacs/site-lisp", "pymacs.el.in", "pymacs.el")

    pisitools.dodoc("THANKS", "README", "TODO")


code:
;;; Pymacs site-lisp configuration

(add-to-list 'load-path "/usr/share/emacs/site-lisp/")
(require 'pymacs)
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>pymacs</Name>
        <Homepage>http://pymacs.progiciels-bpi.ca/pymacs.html</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>library</IsA>
        <Summary>Interface between Emacs Lisp and Python</Summary>
        <Description>Pymacs is a powerful tool which, once started from Emacs, allows two-way communication between Emacs Lisp and Python.</Description>
        <Archive sha1sum="f79a434b19ded8918ae773246aa99ab38a937324" type="targz">https://github.com/pinard/Pymacs/archive/v0.25.tar.gz</Archive>
    </Source>

    <Package>
        <Name>pymacs</Name>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="data">/usr/share/emacs</Path>
            <Path fileType="config">/etc/emacs/site-lisp</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/etc/emacs/site-lisp/80-pymacs.el">80-pymacs.el</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-05-09</Date>
            <Version>0.25</Version>
            <Comment>Rebuild with new toolchain</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>0.25</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-12-24</Date>
            <Version>0.25</Version>
            <Comment>First release</Comment>
            <Name>Ilker Manap</Name>
            <Email>ilkermanap@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>pymacs</Name>
        <Summary xml:lang="tr">Emacs Lisp ve Python iletişimini sağlayan bir arayüz</Summary>
        <Description xml:lang="tr">Pymacs, Emacs ile çalıştırıldığında, Emacs Lisp ve Python arasında çift yönlü iletişime olanak tanıyan güçlü bir araçtır.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get

def setup():
    autotools.configure("--prefix=/usr \
                         --disable-static \
                         --enable-shared \
                         --enable-introspection")

def build():
    autotools.make()

def install():
    autotools.install()

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "NEWS", "README")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>liblangtag</Name>
        <Homepage>http://tagoh.bitbucket.org/liblangtag</Homepage>
        <Packager>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Packager>
        <License>GPLv3.0</License>
        <License>MPLv2.0</License>
        <IsA>app:console</IsA>
        An interface library to access tags for identifying languages
        <Description>liblangtag is an interface library to access/deal with tags for identifying languages, which is described in RFC.</Description>
        <Archive sha1sum="8f2c0d7f0c2ae9510a58f570aa4bc894c31e22c1" type="tarbz2">https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-0.6.2.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>libxml2-devel</Dependency>
            <Dependency>glib2-devel</Dependency>
            <Dependency>gobject-introspection-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>liblangtag</Name>
        <RuntimeDependencies>
            <Dependency>glib2</Dependency>
            <Dependency>libxml2</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/usr/share/liblangtag</Path>
            <Path fileType="data">/usr/share/gir-1.0</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/gtk-doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>liblangtag-devel</Name>
        liblangtag için geliştirme dosyaları
        <RuntimeDependencies>
            <Dependency release="current">liblangtag</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include/liblangtag</Path>
            <Path fileType="library">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="2">
            <Date>2017-04-11</Date>
            <Version>0.6.2</Version>
            <Comment>First release</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2011-02-07</Date>
            <Version>0.6.2</Version>
            <Comment>First release</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>liblangtag</Name>
        An interface library to access tags for identifying languages
        <Description xml:lang="en">liblangtag is an interface library to access/deal with tags for identifying languages, which is described in RFC.</Description>
    </Source>

    <Package>
        <Name>liblangtag-devel</Name>
        liblangtag için geliştirme dosyaları
    </Package>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get

def setup():
    autotools.configure("--disable-static \
                         --without-docs")

    pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")

def build():
    autotools.make()

def install():
    autotools.install()

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING*", "NEWS", "README")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libmspub</Name>
        <Homepage>http://www.freedesktop.org/wiki/Software/libmspub</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <License>LGPLv2.1</License>
        <License>MPLv1.1</License>
        <IsA>app:gui</IsA>
        Library parsing the Microsoft Publisher documents
        <Description>Libmspub is library providing ability to interpret and import Microsoft Publisher content into various applications. You can find it being used in libreoffice. </Description>
        <Archive sha1sum="321e5f4c00ef270e3fbecac955bc673bb63b5f92" type="tarbz2">http://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.3.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>boost-devel</Dependency>
            <Dependency>doxygen</Dependency>
            <Dependency>help2man</Dependency>
            <Dependency>icu4c-devel</Dependency>
            <Dependency>librevenge-devel</Dependency>
            <Dependency>zlib-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>libmspub</Name>
        <RuntimeDependencies>
            <Dependency>zlib</Dependency>
            <Dependency>icu4c</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>librevenge</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/usr/bin</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="library">/usr/lib</Path>
        </Files>
    </Package>

    <Package>
        <Name>libmspub-devel</Name>
        libmspub için geliştirme dosyaları
        <RuntimeDependencies>
            <Dependency>zlib-devel</Dependency>
            <Dependency>icu4c-devel</Dependency>
            <Dependency>librevenge-devel</Dependency>
            <Dependency release="current">libmspub</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="library">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2018-01-31</Date>
            <Version>0.1.3</Version>
            <Comment>Version bump.</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="3">
            <Date>2017-03-16</Date>
            <Version>0.1.2</Version>
            <Comment>Release Bump</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-10</Date>
            <Version>0.1.2</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-01-24</Date>
            <Version>0.1.2</Version>
            <Comment>First release</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>libmspub</Name>
        Library parsing the Microsoft Publisher documents
        <Description xml:lang="en">Libmspub is library providing ability to interpret and import Microsoft Publisher content into various applications. You can find it being used in libreoffice. </Description>
    </Source>

    <Package>
        <Name>libmspub-devel</Name>
        libmspub için geliştirme dosyaları
    </Package>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure()

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("AUTHORS", "COPYING", "NEWS", "README", "THANKS")
    pisitools.insinto("/usr/share/pixmaps", "moo/mooutils/pixmaps/medit.png")

    pisitools.remove("/usr/share/icons/hicolor/icon-theme.cache")


code:
diff -Nuar medit-1.0.3.orig/moo/medit-app/medit.desktop.in medit-1.0.3/moo/medit-app/medit.desktop.in
--- medit-1.0.3.orig/moo/medit-app/medit.desktop.in	2011-06-20 09:45:47.771000116 +0300
+++ medit-1.0.3/moo/medit-app/medit.desktop.in	2011-06-20 09:47:16.536000117 +0300
@@ -1,6 +1,7 @@
 [Desktop Entry]
 Name=medit
 _Comment=Text editor
+Comment[tr]=Metin Düzenleyici
 Exec=medit %F
 Terminal=false
 Type=Application


code:
diff -Nuar medit-1.0.3.orig/configure.ac medit-1.0.3/configure.ac
--- medit-1.0.3.orig/configure.ac	2011-06-20 09:45:47.736000116 +0300
+++ medit-1.0.3/configure.ac	2011-06-20 10:04:24.646000116 +0300
@@ -37,7 +37,7 @@
 AC_SUBST(MOO_COPYRIGHT,"_moo_copyright_")

 # keep in sync with po/maintain
-AC_SUBST(MOO_PACKAGE_NAME,"medit-1")
+AC_SUBST(MOO_PACKAGE_NAME,"medit")

 MOO_PREFS_XML_FILE_NAME="prefs.xml"
 MOO_STATE_XML_FILE_NAME="state.xml"


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>medit</Name>
        <Homepage>http://mooedit.sourceforge.net/</Homepage>
        <Packager>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <Icon>medit</Icon>
        <IsA>app:gui</IsA>
        <Summary>Multiplatform GTK text editor</Summary>
        <Description>Medit is a text editor. Started originally as a simple built-in editor component in GGAP, it grew up to a real text editor. The intention now is to make it a useful programming and around-programming text editor.</Description>
        <Archive sha1sum="ed52f8ead3eb2759af48976f4484d1b2e4fa109d" type="tarbz2">mirrors://sourceforge/mooedit/medit-1.2.92-devel.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>python-gtk-devel</Dependency>
            <Dependency>python-devel</Dependency>
            <Dependency>intltool</Dependency>
            <Dependency>gtk2-devel</Dependency>
            <Dependency>atk-devel</Dependency>
            <Dependency>cairo-devel</Dependency>
            <Dependency>gettext-devel</Dependency>
            <Dependency>pkgconfig</Dependency>
            <Dependency>glib2-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
            <Dependency>python3-devel</Dependency>
            <Dependency>libxml2-devel</Dependency>
            <Dependency>gtk2-devel</Dependency>
            <Dependency>pango-devel</Dependency>
            <Dependency>lua-devel</Dependency>
            <Dependency>libSM-devel</Dependency>
            <Dependency>libICE-devel</Dependency>
            <Dependency>gdk-pixbuf-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">desktop-tr.patch</Patch>
            <Patch level="1">fix_help_dir.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>medit</Name>
        <RuntimeDependencies>
            <Dependency>gtk2</Dependency>
            <Dependency>atk</Dependency>
            <Dependency>glib2</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>python</Dependency>
            <Dependency>libxml2</Dependency>
            <Dependency>cairo</Dependency>
            <Dependency>pango</Dependency>
            <Dependency>libSM</Dependency>
            <Dependency>libICE</Dependency>
            <Dependency>gdk-pixbuf</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="data">/usr/share/applications</Path>
            <Path fileType="data">/usr/share/icons/hicolor</Path>
            <Path fileType="data">/usr/share/medit</Path>
            <Path fileType="data">/usr/share/pixmaps</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2018-01-15</Date>
            <Version>1.2.92</Version>
            <Comment>Version bump.</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="3">
            <Date>2017-05-05</Date>
            <Version>1.2.0</Version>
            <Comment>Rebuild with new toolchain</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-15</Date>
            <Version>1.2.0</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-05-08</Date>
            <Version>1.2.0</Version>
            <Comment>First release</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>medit</Name>
        <Summary xml:lang="tr">Sekme özelliğine sahip bir metin düzenleyicisi</Summary>
        <Description xml:lang="tr">Medit, sekme özelliğine sahip hızlı ve kullanışlı bir metin düzenleyicisidir.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.autoreconf("-fvi")
    autotools.configure("--disable-rpath \
                         --enable-utf8 \
                         --enable-altrcname \
                         --disable-speller")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.insinto("/etc/", "doc/sample.nanorc", "nanorc")
    pisitools.dosym("/usr/bin/nano", "/bin/nano")

    pisitools.dohtml("doc/*.html")
    pisitools.dodoc("ChangeLog*", "README", "doc/sample.nanorc", "AUTHORS", "NEWS", "TODO", "COPYING*", "THANKS")


code:
From ffb42bb0d87586adac14144b98333eb52808ce99 Mon Sep 17 00:00:00 2001
From: Mehmet Emre Atasever <memre@pardus.org.tr>
Date: Sun, 26 Jun 2011 18:39:04 +0300
Subject: [PATCH] nanorc default settings changes

Some default settings are not so convenient for Pisi Linux nano users.

also fixes bugs (#pb18483, #pb18484)
---
 doc/nanorc.sample.in |   64 +++++++++++++++++++++++++-------------------------
 1 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/doc/nanorc.sample.in b/doc/nanorc.sample.in
index f164c26..24d3c7b 100644
--- a/doc/nanorc.sample.in
+++ b/doc/nanorc.sample.in
@@ -25,17 +25,17 @@
 # set backupdir ""

 ## Do backwards searches by default.
-# set backwards
+set backwards

 ## Use bold text instead of reverse video text.
-# set boldtext
+set boldtext

 ## The characters treated as closing brackets when justifying
 ## paragraphs.  They cannot contain blank characters.  Only closing
 ## punctuation, optionally followed by closing brackets, can end
 ## sentences.
 ##
-# set brackets ""')>]}"
+set brackets ""')>]}"

 ## Do case sensitive searches by default.
 # set casesensitive
@@ -60,7 +60,7 @@
 ## searches.  They cannot contain blank characters.  The former set must
 ## come before the latter set, and both must be in the same order.
 ##
-# set matchbrackets "(<[{)>]}"
+set matchbrackets "(<[{)>]}"

 ## Use the blank line below the titlebar as extra editing space.
 # set morespace
@@ -139,7 +139,7 @@
 # set smarthome

 ## Use smooth scrolling as the default.
-# set smooth
+set smooth

 ## Enable soft line wrapping (AKA full line display).
 # set softwrap
@@ -153,7 +153,7 @@
 # set suspend

 ## Use this tab size instead of the default; it must be greater than 0.
-# set tabsize 8
+set tabsize 4

 ## Convert typed tabs to spaces.
 # set tabstospaces
@@ -234,79 +234,79 @@

 ## Nanorc files
-# include "@PKGDATADIR@/nanorc.nanorc"
+include "@PKGDATADIR@/nanorc.nanorc"

 ## C/C++
-# include "@PKGDATADIR@/c.nanorc"
+include "@PKGDATADIR@/c.nanorc"

 ## Makefiles
-# include "@PKGDATADIR@/makefile.nanorc"
+include "@PKGDATADIR@/makefile.nanorc"

 ## Cascading Style Sheets
-# include "@PKGDATADIR@/css.nanorc"
+include "@PKGDATADIR@/css.nanorc"

 ## Debian files
-# include "@PKGDATADIR@/debian.nanorc"
+include "@PKGDATADIR@/debian.nanorc"

 ## Gentoo files
-# include "@PKGDATADIR@/gentoo.nanorc"
+include "@PKGDATADIR@/gentoo.nanorc"

 ## HTML
-# include "@PKGDATADIR@/html.nanorc"
+include "@PKGDATADIR@/html.nanorc"

 ## PHP
-# include "@PKGDATADIR@/php.nanorc"
+include "@PKGDATADIR@/php.nanorc"

 ## TCL
-# include "@PKGDATADIR@/tcl.nanorc"
+include "@PKGDATADIR@/tcl.nanorc"

 ## TeX
-# include "@PKGDATADIR@/tex.nanorc"
+include "@PKGDATADIR@/tex.nanorc"

 ## Quoted emails (under e.g. mutt)
-# include "@PKGDATADIR@/mutt.nanorc"
+include "@PKGDATADIR@/mutt.nanorc"

 ## Patch files
-# include "@PKGDATADIR@/patch.nanorc"
+include "@PKGDATADIR@/patch.nanorc"

 ## Manpages
-# include "@PKGDATADIR@/man.nanorc"
+include "@PKGDATADIR@/man.nanorc"

 ## Groff
-# include "@PKGDATADIR@/groff.nanorc"
+include "@PKGDATADIR@/groff.nanorc"

 ## Perl
-# include "@PKGDATADIR@/perl.nanorc"
+include "@PKGDATADIR@/perl.nanorc"

 ## Python
-# include "@PKGDATADIR@/python.nanorc"
+include "@PKGDATADIR@/python.nanorc"

 ## Ruby
-# include "@PKGDATADIR@/ruby.nanorc"
+include "@PKGDATADIR@/ruby.nanorc"

 ## Java
-# include "@PKGDATADIR@/java.nanorc"
+include "@PKGDATADIR@/java.nanorc"

 ## Fortran
-# include "@PKGDATADIR@/fortran.nanorc"
+include "@PKGDATADIR@/fortran.nanorc"

 ## Objective-C
-# include "@PKGDATADIR@/objc.nanorc"
+include "@PKGDATADIR@/objc.nanorc"

 ## OCaml
-# include "@PKGDATADIR@/ocaml.nanorc"
+include "@PKGDATADIR@/ocaml.nanorc"

 ## AWK
-# include "@PKGDATADIR@/awk.nanorc"
+include "@PKGDATADIR@/awk.nanorc"

 ## Assembler
-# include "@PKGDATADIR@/asm.nanorc"
+include "@PKGDATADIR@/asm.nanorc"

 ## Bourne shell scripts
-# include "@PKGDATADIR@/sh.nanorc"
+include "@PKGDATADIR@/sh.nanorc"

 ## POV-Ray
-# include "@PKGDATADIR@/pov.nanorc"
+include "@PKGDATADIR@/pov.nanorc"

 ## XML-type files
-# include "@PKGDATADIR@/xml.nanorc"
+include "@PKGDATADIR@/xml.nanorc"
--
1.7.5.4


code:
From fc87b0a32c130a2b3ab37e614d4a1c6c8e5d70e7 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Thu, 19 Aug 2010 13:58:12 +0200
Subject: [PATCH 1/2] check stat's result and avoid calling stat on a NULL pointer

---
 src/files.c |   33 +++++++++++++++++++++++++--------
 1 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/src/files.c b/src/files.c
index f6efbf1..99cc1b8 100644
--- a/src/files.c
+++ b/src/files.c
@@ -103,6 +103,24 @@ void initialize_buffer_text(void)
     openfile->totsize = 0;
 }

+#ifndef NANO_TINY
+/* If *pstat is NULL, perform a stat call with the given file name.  On success,
+ * *pstat points to a newly allocated buffer that contains the stat's result.
+ * On stat's failure, the NULL pointer in *pstat is left intact. */
+void stat_if_needed(const char *filename, struct stat **pstat)
+{
+    struct stat *tmp;
+    if (*pstat)
+	return;
+
+    tmp = (struct stat *)nmalloc(sizeof(struct stat));
+    if (0 == stat(filename, tmp))
+	*pstat = tmp;
+    else
+	free(tmp);
+}
+#endif
+
 /* If it's not "", filename is a file to open.  We make a new buffer, if
  * necessary, and then open and read the file, if applicable. */
 void open_buffer(const char *filename, bool undoable)
@@ -148,11 +166,7 @@ void open_buffer(const char *filename, bool undoable)
     if (rc > 0) {
 	read_file(f, rc, filename, undoable, new_buffer);
 #ifndef NANO_TINY
-	if (openfile->current_stat == NULL) {
-	    openfile->current_stat =
-		(struct stat *)nmalloc(sizeof(struct stat));
-	    stat(filename, openfile->current_stat);
-	}
+	stat_if_needed(filename, &openfile->current_stat);
 #endif
     }

@@ -1532,8 +1546,8 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
      * specified it interactively), stat and save the value
      * or else we will chase null pointers when we do
      * modtime checks, preserve file times, etc. during backup */
-    if (openfile->current_stat == NULL && !tmp && realexists)
-	stat(realname, openfile->current_stat);
+    if (!tmp && realexists)
+	stat_if_needed(realname, &openfile->current_stat);

     /* We backup only if the backup toggle is set, the file isn't
      * temporary, and the file already exists.  Furthermore, if we
@@ -1924,7 +1938,10 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
 	if (openfile->current_stat == NULL)
 	    openfile->current_stat =
 		(struct stat *)nmalloc(sizeof(struct stat));
-	stat(realname, openfile->current_stat);
+	if (stat(realname, openfile->current_stat)) {
+	    free(openfile->current_stat);
+	    openfile->current_stat = NULL;
+	}
 #endif

 	statusbar(P_("Wrote %lu line", "Wrote %lu lines",
--
1.7.4


code:
From 23510b930ea31f7de8005e2f0ff6cab7062b4e26 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Thu, 19 Aug 2010 15:23:06 +0200
Subject: [PATCH 2/2] use futimens() if available, instead of utime()

---
 config.h.in  |    3 +++
 configure    |    2 +-
 configure.ac |    2 +-
 src/files.c  |   48 +++++++++++++++++++++++++++++++++++-------------
 4 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/config.h.in b/config.h.in
index 52e13f1..cb17b29 100644
--- a/config.h.in
+++ b/config.h.in
@@ -64,6 +64,9 @@
 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
 #undef HAVE_DOPRNT

+/* Define to 1 if you have the `futimens' function. */
+#undef HAVE_FUTIMENS
+
 /* Define to 1 if you have the `getdelim' function. */
 #undef HAVE_GETDELIM

diff --git a/configure b/configure
index 02733c7..1805e53 100755
--- a/configure
+++ b/configure
@@ -7484,7 +7484,7 @@ fi

-for ac_func in getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf
+for ac_func in futimens getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/configure.ac b/configure.ac
index 66f8ee3..f4975d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,7 +415,7 @@ fi])

 dnl Checks for functions.

-AC_CHECK_FUNCS(getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf)
+AC_CHECK_FUNCS(futimens getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf)

 if test x$enable_utf8 != xno; then
     AC_CHECK_FUNCS(iswalnum iswblank iswpunct iswspace nl_langinfo mblen mbstowcs mbtowc wctomb wcwidth)
diff --git a/src/files.c b/src/files.c
index 99cc1b8..9a1bdcc 100644
--- a/src/files.c
+++ b/src/files.c
@@ -1455,6 +1455,29 @@ int copy_file(FILE *inn, FILE *out)
     return retval;
 }

+#ifdef HAVE_FUTIMENS
+/* set atime/mtime by file descriptor */
+int utime_wrap(int fd, const char *filename, struct utimbuf *ut)
+{
+    struct timespec times[2];
+    (void) filename;
+
+    times[0].tv_sec = ut->actime;
+    times[1].tv_sec = ut->modtime;
+    times[0].tv_nsec = 0L;
+    times[1].tv_nsec = 0L;
+
+    return futimens(fd, times);
+}
+#else
+/* set atime/mtime by file name */
+int utime_wrap(int fd, const char *filename, struct utimbuf *ut)
+{
+    (void) fd;
+    return utime(filename, ut);
+}
+#endif
+
 /* Write a file out to disk.  If f_open isn't NULL, we assume that it is
  * a stream associated with the file, and we don't try to open it
  * ourselves.  If tmp is TRUE, we set the umask to disallow anyone else
@@ -1694,6 +1717,18 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
 	fprintf(stderr, "Backing up %s to %s\n", realname, backupname);
 #endif

+	/* Set backup's file metadata. */
+	if (utime_wrap(backup_fd, backupname, &filetime) == -1
+		&& !ISSET(INSECURE_BACKUP)) {
+	    statusbar(_("Error writing backup file %s: %s"), backupname,
+			strerror(errno));
+	    /* If we can't write to the backup, DONT go on, since
+	       whatever caused the backup file to fail (e.g. disk
+	       full may well cause the real file write to fail, which
+	       means we could lose both the backup and the original! */
+	    goto cleanup_and_exit;
+	}
+
 	/* Copy the file. */
 	copy_status = copy_file(f, backup_file);

@@ -1704,19 +1739,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
 	    goto cleanup_and_exit;
 	}

-	/* And set its metadata. */
-	if (utime(backupname, &filetime) == -1 && !ISSET(INSECURE_BACKUP)) {
-	    if (prompt_failed_backupwrite(backupname))
-		goto skip_backup;
-	    statusbar(_("Error writing backup file %s: %s"), backupname,
-			strerror(errno));
-	    /* If we can't write to the backup, DONT go on, since
-	       whatever caused the backup file to fail (e.g. disk
-	       full may well cause the real file write to fail, which
-	       means we could lose both the backup and the original! */
-	    goto cleanup_and_exit;
-	}
-
 	free(backupname);
     }

--
1.7.4


code:
 po/Makefile.in.in |    1 +
 src/nano.c        |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index ada8bb4..f7b2a95 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -20,6 +20,7 @@ VPATH = @srcdir@

 prefix = @prefix@
 exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
 datadir = @datadir@
 localedir = $(datadir)/locale
 gettextsrcdir = $(datadir)/gettext/po
diff --git a/src/nano.c b/src/nano.c
index 269ab29..5b605bf 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1925,7 +1925,7 @@ precalc_cleanup:
  * TRUE. */
 void do_output(char *output, size_t output_len, bool allow_cntrls)
 {
-    size_t current_len, orig_lenpt, i = 0;
+    size_t current_len, orig_lenpt = 0, i = 0;
     char *char_buf = charalloc(mb_cur_max());
     int char_buf_len;

diff --git a/src/search.c b/src/search.c
index ca93098..3451600 100644
--- a/src/search.c
+++ b/src/search.c
@@ -138,7 +138,7 @@ int search_init(bool replacing, bool use_answer)
     int i = 0;
     char *buf;
     sc *s;
-    void (*func)(void);
+    void (*func)(void) = (void (*)(void))0;
     bool meta_key = FALSE, func_key = FALSE;
     static char *backupstring = NULL;
 	/* The search string we'll be using. */


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>nano</Name>
        <Homepage>http://www.nano-editor.org/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv3</License>
        <IsA>app:console</IsA>
        <Summary>GNU GPL'd Pico clone with more functionality</Summary>
        <Description>Nano is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package. Rather than just copying Pico's look and feel, nano also implements some missing (or disabled by default) features in Pico, such as "search and replace" and "go to line number".</Description>
        <Archive sha1sum="2f7866e9fa6f3ecd780395aaf501fa44335c92f0" type="tarxz">https://www.nano-editor.org/dist/v2.9/nano-2.9.1.tar.xz</Archive>
        <BuildDependencies>
            <Dependency>groff</Dependency>
            <Dependency>ncurses-devel</Dependency>
            <Dependency>gettext-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>nano</Name>
        <RuntimeDependencies>
            <Dependency>ncurses</Dependency>
            <Dependency>file</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="doc">/usr/share/doc/nano</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="info">/usr/share/info</Path>
            <Path fileType="data">/usr/share/nano</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/bin</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-12-28</Date>
            <Version>2.9.1</Version>
            <Comment>Version Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2017-03-19</Date>
            <Version>2.7.5</Version>
            <Comment>Version Bump.</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-10</Date>
            <Version>2.5.0</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-01-02</Date>
            <Version>2.5.0</Version>
            <Comment>First release</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>nano</Name>
        <Summary xml:lang="tr">Konsol ortamında kullanabileceğiniz bir metin düzenleyicidir.</Summary>
        <Description xml:lang="tr">Nano özgür olmayan Pine paketinin içindeki metin düzenleme programı olan Pico'nun yerine geçme hedefini güden küçük, özgür ve kullanışlı bir metin düzenleme programıdır. Pico'nun görünüşünü ve işlevini kopyalamaktan çok, Nano aynı zamanda "ara ve değiştir" ve "satır numarasına git" gibi Pico'da olmayan (veya ön tanımlı olarak kapalı) bazı özellikleri sunar.</Description>
        <Description xml:lang="fr">Nano est un petit éditeur libre et convivial qui a pour but de remplacer Pico, l'éditeur par défaut inclus dans le paquet non-libre Pine. Plutôt que juste copier l'apparence et le ressenti de Pico, nan implémente également certaines fonctionnalité manquantes (ou désactivées par défaut), tel que "rechercher et remplacer" ou "allez à la ligne numéro".</Description>
    </Source>
</PISI>


code:
<PISI>
    <Name>editor.vi</Name>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get

#WorkDir = "vim74"

def setup():
    # TODO: do we need that ?
    shelltools.export("CXXFLAGS", get.CXXFLAGS().replace("-D_FORTIFY_SOURCE=2", ""))
    shelltools.export("CFLAGS", get.CFLAGS().replace("-D_FORTIFY_SOURCE=2", ""))
    pisitools.dosed("runtime/tools/mve.awk", "#!/usr/bin/nawk -f", "#!/usr/bin/awk -f")

    # define the place for the global (g)vimrc file (set to /etc/vim/vimrc)
    shelltools.echo("src/feature.h", "#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"")

    # our binary ctags file is names as exuberant-ctags
    pisitools.dosed("runtime/doc/syntax.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
    pisitools.dosed("runtime/doc/tagsrch.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
    pisitools.dosed("runtime/doc/usr_29.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
    pisitools.dosed("runtime/menu.vim", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
#    pisitools.dosed("src/configure.in", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")

    # TODO: do we need that ?
#    pisitools.dosed("src/configure.in", r"libc\.h", "")

    # TODO: we could need that
    #autotools.make("-C src autoconf")

    # TODO: * We should use "big" feature instead of "huge".
    #       * Investigate impacts on current use
    options ="--with-features=huge \
              --enable-multibyte \
              --enable-perlinterp \
              --enable-pythoninterp \
              --enable-rubyinterp \
              --enable-gui=no \
              --with-tlib=ncurses \
              --prefix=/usr \
              --localstatedir=/var/lib/vim \
              --with-features=big \
              --disable-acl \
              --with-compiledby=PisiLinux \
              --enable-gpm \
              --enable-acl \
              --enable-cscope \
              --disable-netbeans \
              --disable-luainterp \
              --with-x=no \
              --with-modified-by=PisiLinux"

    if get.buildTYPE() == "gui":
        options += " --enable-gui=gtk2 \
                     --with-vim-name=gvim \
                     --with-view-name=gview \
                     --with-x=yes"

    autotools.configure(options)

def build():
    autotools.make()

def install():
    autotools.rawInstall("VIMRCLOC=/etc/vim DESTDIR=%s" % get.installDIR())

    # enough for gui building, quit here
    if get.buildTYPE() == "gui":
        return

    # Vi != Vim, it's hard to break habbits
    pisitools.dosym("vim", "/usr/bin/vi")
    pisitools.dosym("/usr/bin/vim", "/bin/ex")


code:
#!/bin/sh

# Start GUI Vim on a copy of the tutor file.

# Usage: gvimtutor [xx]
# See vimtutor for usage.

exec `dirname $0`/vimtutor -g "$@"

path: editor/vi/vim/files/gvimtutor


code:
" Vim plugin
" Purpose:      Intelligently create content for PISI's action.py files
" Author:       A. Murat Eren
" Copyright:    Copyright (c) 2005 A. Murat Eren & S. Çağlar Onur
" Licence:      You may redistribute this under the terms of the GNU GPL v2..

if &compatible || v:version < 603
    finish
endif

fun! MakeNewActionsPY()
    set nopaste

    0 put = '# -*- coding: utf-8 -*-'
    put = '#'
    put = '# Copyright 2011 TUBITAK/BILGEM'
    put = '# Licensed under the GNU General Public License, version 2.'
    put = '# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt'
    put = ''
    put = 'from pisi.actionsapi import autotools'
    put = 'from pisi.actionsapi import pisitools'
    put = 'from pisi.actionsapi import get'
    put = ''
    put = 'def setup():'
    put = '    pass'
    put = ''
    put = 'def build():'
    put = '    pass'
    put = ''
    put = 'def install():'
    put = '    pass'
    14
endfun

com! -nargs=0 NewActionsPY call MakeNewActionsPY()

augroup NewActionsPY
    au!
    autocmd BufNewFile actions.py call MakeNewActionsPY()
augroup END

" vim: set et foldmethod=marker : "


code:
diff -Nur vim72-old/runtime/filetype.vim vim72/runtime/filetype.vim
--- vim72-old/runtime/filetype.vim	2008-10-18 01:14:23.000000000 +0300
+++ vim72/runtime/filetype.vim	2008-10-18 01:15:01.000000000 +0300
@@ -1677,6 +1677,7 @@
 " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
 " Gentoo ebuilds are actually bash scripts
 au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild call SetFileTypeSH("bash")
+au BufNewFile,BufRead */etc/bash*completion*/* call SetFileTypeSH("bash")
 au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
 au BufNewFile,BufRead /etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))


code:
diff -Nur vim72-old/runtime/syntax/grub.vim vim72/runtime/syntax/grub.vim
--- vim72-old/runtime/syntax/grub.vim	2008-10-18 01:14:23.000000000 +0300
+++ vim72/runtime/syntax/grub.vim	2008-10-18 01:18:04.000000000 +0300
@@ -27,7 +27,7 @@

 syn cluster grubCommands      contains=grubCommand,grubTitleCommand

-syn keyword grubCommand       contained default fallback hiddenmenu timeout
+syn keyword grubCommand       contained default fallback hiddenmenu timeout splashimage background gfxmenu

 syn keyword grubTitleCommand  contained title nextgroup=grubTitle skipwhite


code:
if &compatible || v:version < 603
    finish
endif

fun! MakeNewPSPEC()
    set nopaste

    0 put = '<?xml version=\"1.0\" ?>'
    put = '<!DOCTYPE PISI SYSTEM \"http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd\">'
    put = '<PISI>'
    put = '    <Source>'
    put = '        <Name></Name>'
    put = '        <Homepage>http://</Homepage>'
    put = '        <Packager>'
    put = '            <Name></Name>'
    put = '            <Email></Email>'
    put = '        </Packager>'
    put = '        <License>GPLv2</License>'
    put = '        <Icon></Icon>'
    put = '        <IsA></IsA>'
    put = '        <Summary></Summary>'
    put = '        <Description></Description>'
    put = '        <Archive sha1sum=\"\" type=\"\">http://</Archive>'
    put = '        <BuildDependencies>'
    put = '            <Dependency></Dependency>'
    put = '        </BuildDependencies>'
    put = '        <Patches>'
    put = '            <Patch level=\"\"></Patch>'
    put = '        </Patches>'
    put = '    </Source>'
    put = ''
    put = '    <Package>'
    put = '        <Name></Name>'
    put = '        <RuntimeDependencies>'
    put = '            <Dependency versionFrom=\"\"></Dependency>'
    put = '        </RuntimeDependencies>'
    put = '        <Files>'
    put = '            <Path fileType=\"config\">/etc</Path>'
    put = '            <Path fileType=\"executable\">/usr/bin</Path>'
    put = '            <Path fileType=\"header\">/usr/include</Path>'
    put = '            <Path fileType=\"library\">/usr/lib</Path>'
    put = '            <Path fileType=\"localedata\">/usr/share/locale</Path>'
    put = '            <Path fileType=\"man\">/usr/share/man</Path>'
    put = '            <Path fileType=\"doc\">/usr/share/doc</Path>'
    put = '            <Path fileType=\"data\">/usr/share</Path>'
    put = '        </Files>'
    put = '        <AdditionalFiles>'
    put = '            <AdditionalFile owner=\"root\" permission=\"0644\" target=\"\"></AdditionalFile>'
    put = '        </AdditionalFiles>'
    put = '        <Provides>'
    put = '            <COMAR script=\"\"></COMAR>'
    put = '        </Provides>'
    put = '    </Package>'
    put = ''
    put = '    <History>'
    put = '        <Update release=\"1\">'
    put = '            <Date>YYYY-MM-DD</Date>'
    put = '            <Version></Version>'
    put = '            <Comment>First release.</Comment>'
    put = '            <Name></Name>'
    put = '            <Email></Email>'
    put = '        </Update>'
    put = '    </History>'
    put = '</PISI>'
    14
endfun

com! -nargs=0 NewPSPEC call MakeNewPSPEC()

augroup NewPSPEC
    au!
    autocmd BufNewFile pspec.xml call MakeNewPSPEC()
augroup END

" vim: set et foldmethod=marker : "


code:
" Vim plugin
" Purpose:      Intelligently create content for PISI's translations.xml files
" Author:       İnanç Yıldırgan
" Copyright:    Copyright (c) 2008 İnanç Yıldırgan
" Licence:      You may redistribute this under the terms of the GNU GPL v2..

if &compatible || v:version < 603
    finish
endif

fun! MakeNewTranslations()
    set nopaste

    0 put = '<?xml version=\"1.0\" ?>'
    put = '<PISI>'
    put = '    <Source>'
    put = '        <Name></Name>'
    put = '        <Summary xml:lang=\"\"></Summary>'
    put = '        <Description xml:lang=\"\"></Description>'
    put = '    </Source>'
    put = '</PISI>'
    14
endfun

com! -nargs=0 MakeNewTranslations call MakeNewTranslations()

augroup MakeNewTranslations
    au!
    autocmd BufNewFile translations.xml call MakeNewTranslations()
augroup END

" vim: set et foldmethod=marker : "


code:
diff -Nur vim72-old/runtime/syntax/xf86conf.vim vim72/runtime/syntax/xf86conf.vim
--- vim72-old/runtime/syntax/xf86conf.vim	2008-10-18 01:14:23.000000000 +0300
+++ vim72/runtime/syntax/xf86conf.vim	2008-10-18 01:16:12.000000000 +0300
@@ -68,6 +68,7 @@
 	syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword
 	syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment
 	syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOption,xf86confKeyword
+	syn region xf86confSectionExtensions matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Extensions\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword
 	syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
 	syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confKeyword,@xf86confSectionErrors
 	syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
@@ -174,6 +175,7 @@
 endif
 syn sync match xf86confSyncSectionMonitor groupthere xf86confSectionMonitor "^\s*Section\s\+\"Monitor\""
 syn sync match xf86confSyncSectionScreen groupthere xf86confSectionScreen "^\s*Section\s\+\"Screen\""
+syn sync match xf86confSyncSectionExtensions groupthere xf86confSectionExtensions "^\s*Section\s\+\"Extensions\""
 syn sync match xf86confSyncEndSection groupthere NONE "^\s*End_*Section\s*$"

 " Define the default highlighting


code:
" To use this file, add this line to your ~/.vimrc:, w/o the dquote
" source /path/to/kde/sources/kdesdk/scripts/kde-devel-vim.vim
"
" For CreateChangeLogEntry() : If you don't want to re-enter your
" Name/Email in each vim session then make sure to have the viminfo
" option enabled in your ~/.vimrc, with the '!' flag, enabling persistent
" storage of global variables. Something along the line of
" set   viminfo=%,!,'50,\"100,:100,n~/.viminfo
" should do the trick.

" Don't include these in filename completions
set suffixes+=.lo,.o,.moc,.la,.closure,.loT

" Search for headers here
set path=.,/usr/include,/usr/local/include,
if $QTDIR != ''
    let &path = &path . $QTDIR . '/include/,'
endif
if $KDEDIR != ''
    let &path = &path . $KDEDIR . '/include/,'
    let &path = &path . $KDEDIR . '/include/arts/,'
endif
if $KDEDIRS != ''
    let &path = &path . substitute( $KDEDIRS, '\(:\|$\)', '/include,', 'g' )
    let &path = &path . substitute( $KDEDIRS, '\(:\|$\)', '/include/arts,', 'g' )
endif
set path+=,

" Use makeobj to build
set mp=makeobj

" If TagList is Loaded then get a funny statusline
" Only works if kde-devel-vim.vim is loaded after taglist.
" Droping this script in ~/.vim/plugin works fine
if exists('loaded_taglist')
    let Tlist_Process_File_Always=1
    set statusline=%<%f:[\ %{Tlist_Get_Tag_Prototype_By_Line()}\ ]\ %h%m%r%=%-14.(%l,%c%V%)\ %P
endif

" Insert tab character in whitespace-only lines, complete otherwise
inoremap <Tab> <C-R>=SmartTab()<CR>

if exists("EnableSmartParens")
" Insert a space after ( or [ and before ] or ) unless preceded by a matching
" paren/bracket or space or inside a string or comment. Comments are only
" recognized as such if they start on the current line :-(
inoremap ( <C-R>=SmartParens( '(' )<CR>
inoremap [ <C-R>=SmartParens( '[' )<CR>
inoremap ] <C-R>=SmartParens( ']', '[' )<CR>
inoremap ) <C-R>=SmartParens( ')', '(' )<CR>
endif

" Insert an #include statement for the current/last symbol
inoremap <F5> <C-O>:call AddHeader()<CR>

" Insert a forward declaration for the current/last symbol
" FIXME: not implemented yet
" inoremap <S-F5> <C-O>:call AddForward()<CR>

" Switch between header and implementation files on ,h
nmap <silent> ,h :call SwitchHeaderImpl()<CR>

" Comment selected lines on ,c in visual mode
vmap ,c :s,^,//X ,<CR>:noh<CR>
" Uncomment selected lines on ,u in visual mode
vmap ,u :s,^//X ,,<CR>

" Insert an include guard based on the file name on ,i
nmap ,i :call IncludeGuard()<CR>o

" Insert simple debug statements into each method
nmap ,d :call InsertMethodTracer()<CR>

" Expand #i to #include <.h> or #include ".h". The latter is chosen
" if the character typed after #i is a dquote
" If the character is > #include <> is inserted (standard C++ headers w/o .h)
iab #i <C-R>=SmartInclude()<CR>

" Insert a stripped down CVS diff
iab DIFF <Esc>:call RunDiff()<CR>

" mark 'misplaced' tab characters
set listchars=tab:�\ ,trail:�
set list

set incsearch

function! SmartTab()
    let col = col('.') - 1
    if !col || getline('.')[col-1] !~ '\k'
        return "\<Tab>"
    else
        return "\<C-P>"
    endif
endfunction

function! SmartParens( char, ... )
    if ! ( &syntax =~ '^\(c\|cpp\|java\)$' )
        return a:char
    endif
    let s = strpart( getline( '.' ), 0, col( '.' ) - 1 )
    if s =~ '//'
        return a:char
    endif
    let s = substitute( s, '/\*\([^*]\|\*\@!/\)*\*/', '', 'g' )
    let s = substitute( s, "'[^']*'", '', 'g' )
    let s = substitute( s, '"\(\\"\|[^"]\)*"', '', 'g' )
    if s =~ "\\([\"']\\|/\\*\\)"
        return a:char
    endif
    if a:0 > 0
        if strpart( getline( '.' ), col( '.' ) - 3, 2 ) == a:1 . ' '
            return "\<BS>" . a:char
        endif
        if strpart( getline( '.' ), col( '.' ) - 2, 1 ) == ' '
            return a:char
        endif
        return ' ' . a:char
    endif
    if a:char == '('
        if strpart( getline( '.' ), col( '.' ) - 3, 2 ) == 'if' ||
          \strpart( getline( '.' ), col( '.' ) - 4, 3 ) == 'for' ||
          \strpart( getline( '.' ), col( '.' ) - 6, 5 ) == 'while' ||
          \strpart( getline( '.' ), col( '.' ) - 7, 6 ) == 'switch'
            return ' ( '
        endif
    endif
    return a:char . ' '
endfunction

function! SwitchHeaderImpl()
    let headers = '\.\([hH]\|hpp\|hxx\)$'
    let impl = '\.\([cC]\|cpp\|cc\|cxx\)$'
    let fn = expand( '%' )
    if fn =~ headers
        let list = glob( substitute( fn, headers, '.*', '' ) )
    elseif fn =~ impl
        let list = glob( substitute( fn, impl, '.*', '' ) )
    endif
    while strlen( list ) > 0
        let file = substitute( list, "\n.*", '', '' )
        let list = substitute( list, "[^\n]*", '', '' )
        let list = substitute( list, "^\n", '', '' )
        if ( fn =~ headers && file =~ impl ) || ( fn =~ impl && file =~ headers )
            execute( "edit " . file )
            return
        endif
    endwhile
    echohl ErrorMsg
    echo "File switch failed!"
    echohl None
endfunction

function! IncludeGuard()
    let guard = toupper( substitute( expand( '%' ), '\([^.]*\)\.h', '\1_h', '' ) )
    call append( '^', '#define ' . guard )
    +
    call append( '^', '#ifndef ' . guard )
    call append( '$', '#endif // ' . guard )
    +
endfunction

function! SmartInclude()
    let next = nr2char( getchar( 0 ) )
    if next == '"'
        return "#include \".h\"\<Left>\<Left>\<Left>"
    endif
    if next == '>'
        return "#include <>\<Left>"
    endif
    return "#include <.h>\<Left>\<Left>\<Left>"
endfunction

function! MapIdentHeader( ident )
    " Qt stuff
    if a:ident =~ 'Q.*Layout'
        return '<qlayout.h>'
    elseif a:ident == 'QListViewItem' ||
          \a:ident == 'QCheckListItem' ||
          \a:ident == 'QListViewItemIterator'
        return '<qlistview.h>'
    elseif a:ident == 'QIconViewItem' ||
          \a:ident == 'QIconDragItem' ||
          \a:ident == 'QIconDrag'
        return '<qiconview.h>'
    elseif a:ident =~ 'Q.*Drag' ||
          \a:ident == 'QDragManager'
        return '<qdragobject.h>'
    elseif a:ident == 'QMimeSource' ||
          \a:ident == 'QMimeSourceFactory' ||
          \a:ident == 'QWindowsMime'
        return '<qmime.h>'
    elseif a:ident == 'QPtrListIterator'
        return '<qptrlist.h>'
    elseif a:ident =~ 'Q.*Event'
        return '<qevent.h>'
    elseif a:ident == 'QTime' ||
          \a:ident == 'QDate'
        return '<qdatetime.h>'
    elseif a:ident == 'QTimeEdit' ||
          \a:ident == 'QDateTimeEditBase' ||
          \a:ident == 'QDateEdit'
        return '<qdatetimeedit.h>'
    elseif a:ident == 'QByteArray'
        return '<qcstring.h>'
    elseif a:ident == 'QWidgetListIt'
        return '<qwidgetlist.h>'
    elseif a:ident == 'QTab'
        return '<qtabbar.h>'
    elseif a:ident == 'QColorGroup'
        return '<qpalette.h>'
    elseif a:ident == 'QActionGroup'
        return '<qaction.h>'
    elseif a:ident =~ 'Q.*Validator'
        return '<qvalidator.h>'
    elseif a:ident =~ 'QListBox.*'
        return '<qlistbox.h>'
    elseif a:ident == 'QChar' ||
          \a:ident == 'QCharRef' ||
          \a:ident == 'QConstString'
        return '<qstring.h>'
    elseif a:ident =~ 'QCanvas.*'
        return '<qcanvas.h>'
    elseif a:ident =~ 'QGL.*'
        return '<qgl.h>'
    elseif a:ident == 'QTableSelection' ||
          \a:ident == 'QTableItem' ||
          \a:ident == 'QComboTableItem' ||
          \a:ident == 'QCheckTableItem'
        return '<qtable.h>'
    elseif a:ident == 'qApp'
        return '<qapplication.h>'

    " KDE stuff
    elseif a:ident == 'K\(Double\|Int\)\(NumInput\|SpinBox\)'
        return '<knuminput.h>'
    elseif a:ident == 'KConfigGroup'
        return '<kconfigbase.h>'
    elseif a:ident == 'KListViewItem'
        return '<klistview.h>'
    elseif a:ident =~ 'kd\(Debug\|Warning\|Error\|Fatal\|Backtrace\)'
        return '<kdebug.h>'
    elseif a:ident == 'kapp'
        return '<kapplication.h>'
    elseif a:ident == 'i18n' ||
          \a:ident == 'I18N_NOOP'
        return '<klocale.h>'
    elseif a:ident == 'locate' ||
          \a:ident == 'locateLocal'
        return '<kstandarddirs.h>'

    " aRts stuff
    elseif a:ident =~ '\arts_\(debug\|info\|warning\|fatal\)'
        return '<debug.h>'

    " Standard Library stuff
    elseif a:ident =~ '\(std::\)\?\(cout\|cerr\|endl\)'
        return '<iostream>'
    elseif a:ident =~ '\(std::\)\?is\(alnum\|alpha\|ascii\|blank\|graph\|lower\|print\|punct\|space\|upper\|xdigit\)'
        return '<cctype>'
    endif

    let header = tolower( substitute( a:ident, '::', '/', 'g' ) ) . '.h'
    let check = header
    while 1
        if filereadable( check )
            return '"' . check . '"'
        endif
        let slash = match( check, '/' )
        if slash == -1
            return '<' . header . '>'
        endif
        let check = strpart( check, slash + 1 )
    endwhile
endfunction

" This is a rather dirty hack, but seems to work somehow :-) (malte)
function! AddHeader()
    let s = getline( '.' )
    let i = col( '.' ) - 1
    while i > 0 && strpart( s, i, 1 ) !~ '[A-Za-z0-9_:]'
        let i = i - 1
    endwhile
    while i > 0 && strpart( s, i, 1 ) =~ '[A-Za-z0-9_:]'
        let i = i - 1
    endwhile
    let start = match( s, '[A-Za-z0-9_]\+\(::[A-Za-z0-9_]\+\)*', i )
    let end = matchend( s, '[A-Za-z0-9_]\+\(::[A-Za-z0-9_]\+\)*', i )
    if end > col( '.' )
        let end = matchend( s, '[A-Za-z0-9_]\+', i )
    endif
    let ident = strpart( s, start, end - start )
    let include = '#include ' . MapIdentHeader( ident )

    let line = 1
    let incomment = 0
    let appendpos = 0
    let codestart = 0
    while line <= line( '$' )
        let s = getline( line )
        if incomment == 1
            let end = matchend( s, '\*/' )
            if end == -1
                let line = line + 1
                continue
            else
                let s = strpart( s, end )
                let incomment = 0
            endif
        endif
        let s = substitute( s, '//.*', '', '' )
        let s = substitute( s, '/\*\([^*]\|\*\@!/\)*\*/', '', 'g' )
        if s =~ '/\*'
            let incomment = 1
        elseif s =~ '^' . include
            break
        elseif s =~ '^#include' && s !~ '\.moc"'
            let appendpos = line
        elseif codestart == 0 && s !~ '^$'
            let codestart = line
        endif
        let line = line + 1
    endwhile
    if line == line( '$' ) + 1
        if appendpos == 0
            call append( codestart - 1, include )
            call append( codestart, '' )
        else
            call append( appendpos, include )
        endif
    endif
endfunction

function! RunDiff()
    echo 'Diffing....'
    read! cvs diff -bB -I \\\#include | egrep -v '(^Index:|^=+$|^RCS file:|^retrieving revision|^diff -u|^[+-]{3})'
endfunction

function! CreateChangeLogEntry()
    let currentBuffer = expand( "%" )

    if exists( "g:EMAIL" )
        let mail = g:EMAIL
    elseif exists( "$EMAIL" )
        let mail = $EMAIL
    else
        let mail = inputdialog( "Enter Name/Email for Changelog entry: " )
    if mail == ""
        echo "Aborted ChangeLog edit..."
        return
    endif
    let g:EMAIL = mail
    endif

    if bufname( "ChangeLog" ) != "" && bufwinnr( bufname( "ChangeLog" ) ) != -1
    execute bufwinnr( bufname( "ChangeLog" ) ) . " wincmd w"
    else
        execute "split ChangeLog"
    endif

    let lastEntry = getline( nextnonblank( 1 ) )
    let newEntry = strftime("%Y-%m-%d") . "  " . mail

    if lastEntry != newEntry
        call append( 0, "" )
        call append( 0, "" )
        call append( 0, newEntry )
    endif

    " like emacs, prepend the current buffer name to the entry. but unlike
    " emacs I have no idea how to figure out the current function name :(
    " (Simon)
    if currentBuffer != ""
        let newLine = "\t* " . currentBuffer . ": "
    else
        let newLine = "\t* "
    endif

    call append( 2, newLine )

    execute "normal 3G$"
endfunction

function! AddQtSyntax()
    if expand( "<amatch>" ) == "cpp"
        syn keyword qtKeywords     signals slots emit foreach
        syn keyword qtMacros       Q_OBJECT Q_WIDGET Q_PROPERTY Q_ENUMS Q_OVERRIDE Q_CLASSINFO Q_SETS SIGNAL SLOT
        syn keyword qtCast         qt_cast qobject_cast qvariant_cast qstyleoption_cast
        syn keyword qtTypedef      uchar uint ushort ulong Q_INT8 Q_UINT8 Q_INT16 Q_UINT16 Q_INT32 Q_UINT32 Q_LONG Q_ULONG Q_INT64 Q_UINT64 Q_LLONG Q_ULLONG pchar puchar pcchar qint8 quint8 qint16 quint16 qint32 quint32 qint64 quint64 qlonglong qulonglong
        syn keyword kdeKeywords    k_dcop k_dcop_signals
        syn keyword kdeMacros      K_DCOP ASYNC
        syn keyword cRepeat        foreach
        syn keyword cRepeat        forever

        hi def link qtKeywords          Statement
        hi def link qtMacros            Type
        hi def link qtCast              Statement
        hi def link qtTypedef           Type
        hi def link kdeKeywords         Statement
        hi def link kdeMacros           Type
    endif
endfunction

function! InsertMethodTracer()
    :normal [[kf(yBjokdDebug() << ""()" << endl;
endfunction

function! UpdateMocFiles()
    if &syntax == "cpp"
        let i = 1
        while i < 80
            let s = getline( i )
            if s =~ '^#include ".*\.moc"'
                let s = substitute( s, '.*"\(.*\)\.moc"', '\1.h', '' )
                if stridx( &complete, s ) == -1
                    let &complete = &complete . ',k' . s
                endif
                break
            endif
            let i = i + 1
        endwhile
    endif
endfunction

autocmd Syntax * call AddQtSyntax()
autocmd CursorHold * call UpdateMocFiles()

" vim: sw=4 sts=4 et


code:
"
" Just a little plugin to automatically set utf-8 for new Python files
"

if &compatible || v:version < 603
    finish
endif

fun! MakeNewPythonFile()
    " actions.py has another handler
    if expand("<afile>") == 'actions.py'
        return
    endif
    set nopaste
    0 put = '#!/usr/bin/python'
    put = '# -*- coding: utf-8 -*-'
    put = ''
    5
endfun

com! -nargs=0 NewPythonFile call MakeNewPythonFile()

augroup NewPythonFile
    au!
    autocmd BufNewFile *.py call MakeNewPythonFile()
augroup END

" vim: set et foldmethod=marker : "


code:
" Vim color file
" Maintainer:   Connor Berry <connorberry@yahoo.com>
" Last Change:	2006/05/25
" Version: 1.0

set background=dark
highlight clear
if exists("syntax on")
  syntax reset
endif

let g:colors_name = "redstring"

highlight Normal     term=none ctermfg=grey    cterm=none ctermbg=black  guifg=white    gui=none guibg=black
highlight Comment    term=none ctermfg=DarkGrey    guifg=DarkGrey
highlight Constant   term=none ctermfg=red     cterm=none guifg=red     gui=none
highlight Special    term=none ctermfg=red     cterm=bold guifg=red     gui=bold
highlight Identifier term=none ctermfg=lightgreen    cterm=none guifg=lightgreen    gui=none
highlight Statement  term=bold ctermfg=cyan    cterm=bold guifg=cyan    gui=bold
highlight Operator   term=bold ctermfg=cyan    cterm=bold guifg=cyan    gui=bold
highlight PreProc    term=bold ctermfg=lightgreen   cterm=none guifg=green   gui=none
highlight Type       term=bold ctermfg=lightgreen cterm=none guifg=lightgreen gui=none
highlight String     term=none ctermfg=red     cterm=none guifg=red     gui=none
highlight Number     term=none ctermfg=red     cterm=none guifg=red     gui=none

" vim:ts=2:sw=2:et